vlookup adapation

PGD15

Board Regular
Joined
Aug 5, 2016
Messages
137
Hi,

I am writting a vlookup:

=VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,TRUE)

This formula currently returns the bottom value in column 29. however i want this formula to return the bottom value that is not equal to zero. so i need to try get a <>0 in somewhere but I cannot figure it out.

Can someone please help :)
 
Last edited:
A small update:
=IF(VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,TRUE)=0,INDEX('Daily Breakdown'!$A$2:$A$154,MATCH(B21,'Daily Breakdown'!$AC$2:$AC$154>VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,TRUE),0)),VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,TRUE))
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
um, we're almost there :')

Currently the formula returns the correct value if the last cell in the target range of AC is populated however if this equals 0 or "" this returns the value in column A, i tried adapting the formula from A2:a154 to AC2:ac154 as i think you used the wrong range but then this formula returns the heading... so i changed the ranges to AC3 (top row with a value) then get the message of #na .

I think i must have changed something incorrectly

Edit:

I got the formula to return a value now! issue is ... its the top value (darn it) so i tried changing the true's and false and can either make it return the bottom value (with a 0, not what i want) or the top value which is also not what I want :'(

its effectively doing the simple vlooup(b21,'Daily Breakdown'a2:av154,29,false) still :'(

returns top value:
=IF(VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,TRUE)=0,INDEX('Daily Breakdown'!$AC$3:$AC$154,MATCH(FALSE,'Daily Breakdown'!$AC$3:$AC$154>VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,FALSE),0)),VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,TRUE))

Returns bottom value:
=IF(VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,False)=0,INDEX('Daily Breakdown'!$AC$3:$AC$154,MATCH(FALSE,'Daily Breakdown'!$AC$3:$AC$154>VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,FALSE),0)),VLOOKUP(B21,'Daily Breakdown'!$A$2:$AV$154,29,False))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,637
Messages
6,173,488
Members
452,515
Latest member
archcalx

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