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,448
  • 3
  • 51
  • 66
Thunder
  • 10,366
  • 25
  • 84
  • 114
  • 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
  • 162,879
  • 31
  • 289
  • 284
  • I never knew & was a concatenation operator. All these years using the CONCATENATE function. Oh the wasted keystrokes! – Steve Weet Dec 23 '09 at 08:51
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,448
  • 3
  • 51
  • 66
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
  • 28,126
  • 11
  • 70
  • 86