Finding last non-zero value given a criteria

rpradeepan

New Member
Joined
Nov 24, 2017
Messages
1
Hi guys,

I have a dataset which has a column of customer numbers and then columns of revenue by date (B to CX) and then also have a column (CZ) of date for an email sent. I want to look for the last date of revenue before the date of action. So if the email was sent on 06/11/2017 I want to obtain the last revenue geenrated by the customer before that date. Is there a formula using =LOOKUP(2,1/(A2:CX2<>0),$A$1:$CX$1) but with a condition?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to Mr Excel

Maybe...
=LOOKUP(2,1/((A2:CX2<>0)*(CZ2>$A$1:$CX$1)),$A$1:$CX$1)

M.
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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