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.
If I understand you correctly try
=COLUMN(G6) & "," & ROW(G6)
This will return
7,6
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").
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.
精彩评论