Excel: get number of cell programatically

by Alex   Last Updated April 23, 2018 16:01 PM - source

I’m doing this, but it doesn’t work:

=&ROW(D(RIGHT(A21, LEN(A21)-SEARCH(" ", A21, 1))))

I want to calculate the find number from a different cell, and append it to Drow to get for example: D8

Any suggestions?



Answers 1


You can accomplish this one of two ways. Take a look at the function

=INDIRECT(ref_text)

The "ref_text" can be text that refers to a cell. For example if I put:

=INDIRECT("A1")

where "A1" is text, I can reference a cell. You can piece together the text in this function using other formulas like yours in the original post.

Another way that may work for you as well is to use the function

=OFFSET(reference, rows, cols, [height], [width])

to which you reference a cell initially and then tell the function how many rows or columns you are away from that cell.

Eric F
Eric F
April 23, 2018 15:59 PM

Related Questions





Select 1st day of each user id in excel

Updated December 19, 2018 07:01 AM

Text function in Excel isn't formatting year

Updated February 07, 2019 07:01 AM