Forum Discussion
Cell reference substitution.
- Nov 01, 2022
=ROW(INDIRECT(B32)) returns the row number of the cell whose address is in B32.
=COLUMN(INDIRECT(B32)) returns the column number of the cell whose address is in B32.
Sorry for the late reply. I'm not sure what you mean.
The problem is I have a cell that contains a text string that is a cell location, or the ADDRESS. The address is NOT the location of that cell but one nearby.
Say the cell is E6. It contains the cell ref F5 as a text. From that cell I will reference other nearby cells by using col/row offsets from the cell F5. To do that I need to know what COL cell F5 is in. Row is easy.
In use I will type in (say) cell B32 "F5" as a text string, not a direct cell ref.
I need to calc that "F5" as COL 6 and ROW 5. Then use that in =address() to offset other cells to get the data in E5, F5, G5, etc.
There seems to be no way to calculate the COL number from the data in B32
Any ideas???
jgb
=ROW(INDIRECT(B32)) returns the row number of the cell whose address is in B32.
=COLUMN(INDIRECT(B32)) returns the column number of the cell whose address is in B32.
- JG_BersonNov 01, 2022Copper Contributor
I'll be dammed. That WORKED. Why something that simple escaped me I do not understand.
I have done far more difficult stuff before. Getting old is a **bleep**.
Thank you Thank you Thank you.
jgbThe bleep... courtesy of MS.
Attached is a copy with the DB set up.
Thanks again
jgb