1

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.

RickNZ
  • 18,198
  • 3
  • 50
  • 65
Thunder
  • 9,775
  • 25
  • 79
  • 113
  • I have thought of parsing eg for K56 first seperate K and 56 , Then convert k to a number using logic A being 1 and so on finally getting 11,56 – Thunder Dec 23 '09 at 08:45
  • Got a solution at http://stackoverflow.com/questions/1951517/convert-a-to-1-b-to-2-z-to-26-and-then-aa-to-27-ab-to-28 to convert column to int – Thunder Dec 23 '09 at 09:17

3 Answers3

3

If I understand you correctly try

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

This will return

7,6

Adriaan Stander
  • 156,697
  • 29
  • 278
  • 282
1

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
  • 18,198
  • 3
  • 50
  • 65
0

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
  • 27,606
  • 11
  • 69
  • 86