Lookup Formula Just Stopped Working :(

oscark37

Board Regular
Joined
Nov 23, 2015
Messages
56
So strange. I use a spreadsheet that is updated monthly. I use the following formula to find the value of the last cell with data in a row.

All the sudden, it returns nothing. (data is still there in the rows) What could have gone wrong?

=LOOKUP(1,1/(A10:Z10<>""),A10:Z10)

Thanks,

Oscar
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Id imagine you have a space or something that you cant see in the last cell with a value. Clear the cells after your last cell with data and see if it starts producing what you expect.
 
Upvote 0
No idea what there is in the cells after the last cell with a number, but that worked! But I would have to delete the columns every week. Is there another formula I can use as a more efficient solution? Maybe one that will spit back the last cell with a number, regardless if there are cells after with spaces?

Thanks,

Oscar
 
Upvote 0
There is one for a number but it depends if that number is a true number:

=LOOKUP(9.9E+307,A10:Z10)

Or you could adapt yours slightly:

=LOOKUP(9.9E+307,1/(A10:Z10*(A10:Z10<>"")),A10:Z10)
 
Upvote 0
If you are looking for the last numeric value in A10:Z10, the simpler and faster

=LOOKUP(9.99E+307,A10:Z10)

would the job.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,023
Latest member
alabaz

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