Lookup to find first non-blank cell

mactoolsix

Board Regular
Joined
Nov 30, 2010
Messages
105
I have spreadsheet with a column (N14:N68) of numbers and blanks.
I want to use the last value in the column.

=LOOKUP(2,1/(N14:N68<>""),N14:N68)

This returns a blank answer.

I can attach a spreadsheet example with this post, but I don't see how that is possible?

Thanks!!
Mike
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
This returns a blank answer.
I am guessing that means that you have some entries that appear blank, but really aren't. They may be a single (or multiple) spaces.
Note that a "space" is not the same as "blank".

To find out where this is, go to cell N69, then hit CTRL and the up arrow at the same time, and see what cell it stops at. This is what it is returning.
Check to see if there is anything in this cell (i.e. blank spaces).
 
Upvote 0
Joe - You are correct. Column N:14:N68 is =IF(B14=" "," ",D14+E14+H14) thus if there is nothing in B14 a blank is entered.
How can I get around this?
If there is a way to attach the spreadsheet, I can do that.

Thanks!
Mike
 
Upvote 0
Why not return nothing instead of returning a single space?
Code:
[COLOR=#333333]=IF(B14=" ","",D14+E14+H14)[/COLOR]

Regarding Cross-Posting, while we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here: http://www.mrexcel.com/forum/board-announcements/99490-forum-rules.html).

This way, other members can see what has already been done in regard to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Joe - You are correct. Column N:14:N68 is =IF(B14=" "," ",D14+E14+H14) thus if there is nothing in B14 a blank is entered.
How can I get around this?
If there is a way to attach the spreadsheet, I can do that.

Thanks!
Mike

Hi,

Start by correcting this formula to:

Code:
=IF(B14="","",D14+E14+H14)

Remove the SPACE " " in the result, but what's in B14, does Another formula put a SPACE " " in there also?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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