tags:

views:

200

answers:

3

I would like to convert an excel cell eg : A1 to 1,1 G6 to 7,6 etc

Does any one have idea for it? Note : This is required for a C# application.

+3  A: 

If I understand you correctly try

=COLUMN(G6) & "," & ROW(G6)

This will return

7,6

astander
Steve Weet
Thats Exactly what I am looking for.
Thunder
A: 

If you want to do this as an Excel formula then this will work

=CONCATENATE(ROW(G6),",",COLUMN(G6))

However if you have the cell reference in a string then you will need to use the INDIRECT function as follows

=CONCATENATE(ROW(INDIRECT("G6")),",",COLUMN(INDIRECT("G6")))

This gives a result of 6,7 (Row,Column) as specified in the title.

Steve Weet
Hi,Steve I got true and false result using this formula
Thunder
Hi,Again using indirect worked but how ever I am trying to do this in a C# application so I am still looking a solution Thank you.
Thunder
+1  A: 

You should be able to just treat the alphabetic portion as a number in base 26, with A = 0 (in Excel, the column names eventually repeat, as in "AA").

RickNZ