Formula to find last non blank cell value in a range

G00DNESS

Board Regular
Joined
Aug 6, 2014
Messages
60
I need help finding the value of the last non blank cell in the range (CO40:DB40). These cells do have formulas in them. Some cells may have zero (0) values. If cells (CO40:DB40) are all blank, than I'd like the answer to be zero (0). Thanks!
 
Are all of the cells formula-driven, or just some? Do the formulas return blanks ("") or 0s?

A small example would help us to understand what we're dealing with.

Matty
The cells are not formula driven. I realize now that I made an error in my orig post. Correction: I enter number amounts in them (i.e. 3,000.00) as needed, and there are no formulas in them.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
The cells are not formula driven. I realize now that I made an error in my orig post. Correction: I enter number amounts in them (i.e. 3,000.00) as needed, and there are no formulas in them.

Will the range only ever contain numbers? Or could letters (text) be in there, too?
 
Upvote 0
Try:

Code:
=IF(COUNT(CO40:DB40),LOOKUP(9.99999999999999E+307,CO40:DB40),0)

Matty
 
Upvote 0
Try:

Code:
=IF(COUNT(CO40:DB40),LOOKUP(9.99999999999999E+307,CO40:DB40),0)

Matty
It works like a charm Matty. :) Thank you ever so much! One more question please Matty. When I later go to use this spreadsheet on my other laptop w/ MS Excel 2013, I know it will convert from xls to xlsx. When that happens, will there be an issue with this formula?
 
Upvote 0
It works like a charm Matty. :) Thank you ever so much!

No problem. :)

One more question please Matty. When I later go to use this spreadsheet on my other laptop w/ MS Excel 2013, I know it will convert from xls to xlsx. When that happens, will there be an issue with this formula?

The formula should work on all Excel versions.

Matty
 
Upvote 0

Forum statistics

Threads
1,215,239
Messages
6,123,816
Members
449,127
Latest member
Cyko

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