Return first non blank in the following array if cell is blank

stepan1987

Board Regular
Joined
May 6, 2011
Messages
92
Hi guys,

I need a formula that would return me the value from the cell that is found by vlookup (equal dates). In case there is no value in that cell I need the formula to return me the first non blank value in the cells above that cell.

Here is the formula I use now:
=VLOOKUP($H$2;'Historical Data'!$A:$EZ;MATCH($AQ17;'Historical Data'!$B$1:$EZ$1;0)+1)

$H$2 - date needed which is vlookuped in Historical Data sheet
$AQ17 - name I need value for

Bottomline: I need the first nonblank value on that date or before it

How could that be done? Pls help
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Maybe any ideas guys?
I need smth like

IF(A1=nonblank; A1; (IF(A2=nonblank; A2; IF(A3=nonblank; A3; IF(A4=... until first non blank.. there must be smth similar
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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