# Row & Column cell referencing

#### wrightjames

##### New Member
Hello Mr Excel

I'm trying to create a dynamic formula that picks up the last used cell in a list on another sheet. I've managed to create a formula, (see below) that gets me the row and column of the position of this last non blank cell on another sheet.

I am now trying to substitute this \$N\$203 reference into the formula below so that it dynamically looks up this range, but I keep getting reference errors. Not sure if the INDIRECT formula is used or not. Is there a way of joining this referenced cell into the range below?

LOOKUP(1,0/COUNTIF(K5,"*"&Lookup!\$N\$2:\$N\$203&"*"),Lookup!\$N\$2:\$N\$203)

Hope I've been able to clarify my question. Please can someone give me assistance.

Thanks so much
James

### Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

#### jasonb75

##### Well-known Member
You would need to use Indirect with it to make it work but the way that you are trying to make the range dynamic is going to be counter productive, you would be better off with a single, more efficient formula.
Excel Formula:
``=LOOKUP(2,1/SEARCH(K5,Lookup!\$N\$2:\$N\$1000),Lookup!\$N\$2:\$N\$1000)``

#### wrightjames

##### New Member
Hello Jason

Thanks for your email. I've attached a spreadsheet. Are you able to please let me know what formula syntax you would use in Column B. I would like the LOOKUP formulas to dynamically update from the list on the Lookup Sheet. I'm guessing the green highlighted cell would have to be used in an indirect formula nestled into the LOOKUP formula.

I appreciate very much your expertise. Hopefully the attached excel mini sheet works here.

Regards
James

Indirect.xlsx
ABCDEFGHIJKLMNO
3BBBBBB
4CCCCCC
5DDDDDD
6EEEEEE
7FFFFFF
8GGGGGGLOOKUP(1,0/COUNTIF(A3,"*"&Lookup!\$A\$2:\$A\$27&"*"),Lookup!\$A\$2:\$A\$27)
9HHHHHH
10IIIIII
11JJJJJJ
12KKKKKK
13LLLLLL
14MMMMMM
15NNNNNN
16OOOOOO
17PPPPPP
18QQQQQQ
19RRRRRR
20SSSSSS
21TTTTTT
22UUUUUU
23VVVVVV
24WWWWWW
25XXXXXXX
26YYYYYY
27ZZZZZZZ
28
29
30
Data
Cell Formulas
RangeFormula
B2:B27B2=LOOKUP(1,0/COUNTIF(A2,"*"&Lookup!\$A\$2:\$A\$27&"*"),Lookup!\$A\$2:\$A\$27)
Press CTRL+SHIFT+ENTER to enter array formulas.

#### jasonb75

##### Well-known Member
I would use the formula from my previous post. From your mini sheet it is not clear what is expected, you haven't told us what you want to do, only how you're trying to do it.

Try posting a more realistic example with the results that you expect from the formulas entered manually. When we can see what is needed then it makes it easier to advise a suitable formula.

Replies
8
Views
470
Replies
6
Views
212
Replies
6
Views
367
Replies
5
Views
218
Replies
5
Views
107

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,393
Messages
5,769,824
Members
425,574
Latest member
grimeslisa

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back