Finding the address of the last "Non-Empty" cell in the first row

Jackcell

New Member
Joined
Dec 3, 2017
Messages
14
Hi all,

I would like to find the last non-empty cell in the first row. Is there anyway possible in doing so?

Cheers,
Jack
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Jack

For the address in the first in the first row:

Code:
=ADDRESS(1, LOOKUP(2, 1/(1:1<>""), COLUMN(1:1)))
 
Upvote 0
If you need the cell's address in a function/formula, use INDEX(1:1;1;MAX(MATCH({"ZZZZZZZZZZZZZZZZZZZZ";9,99E+307};1:1))) as reference. No address needed
 
Upvote 0
Address last numeric cell:

=CELL("address",INDEX(1:1,MATCH(9.99E+307,1:1)))

Address last text cell:

=CELL("address",INDEX(1:1,MATCH(REPT("z",255),1:1)))

Address of the last non-empty cell (with any value), control+shift+enter, not just enter:

=CELL("address",INDEX(1:1,MATCH(9.99E+307,1/(1-ISBLANK(1:1)))))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top