VLOOKUP or INDEX/MATCH Question

rigeljr

New Member
Joined
Jul 5, 2021
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am looking for some help with the below table today. This is sample data that represents some real data that I have. The dollar amounts represent payments that have been made and $0 amounts indicate that no payment was made. What I want to do is be able to find the date of the last payment made for each of the people. So for example, Ted would be 1-Aug-21, Fred would be 1-Oct-21, Buddy would be 1-Jul-21 and so on...

Would appreciate any help with this, thank you!


1-May-21​
1-Jun-21​
1-Jul-21​
1-Aug-21​
1-Sep-21​
1-Oct-21​
1-Nov-21​
Ted
$50.00​
$0.00​
$0.00​
$50.00​
$0.00​
$0.00​
$0.00​
Fred
$24.00​
$0.00​
$0.00​
$0.00​
$0.00​
$24.00​
$0.00​
Buddy
$36.00​
$36.00​
$36.00​
$36.00​
$0.00​
$0.00​
$0.00​
Joe
$78.00​
$78.00​
$78.00​
$78.00​
$78.00​
$78.00​
$78.00​
Jeff
$100.00​
$0.00​
$0.00​
$0.00​
$0.00​
$0.00​
$0.00​
John
$200.00​
$0.00​
$100.00​
$150.00​
$200.00​
$0.00​
$0.00​
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
+Fluff 1.xlsm
ABCDEFGHI
101-May-2101-Jun-2101-Jul-2101-Aug-2101-Sep-2101-Oct-2101-Nov-21
2Ted50.000.000.0050.000.000.000.0001-Aug-21
3Fred24.000.000.000.000.0024.000.0001-Oct-21
4Buddy36.0036.0036.0036.000.000.000.0001-Aug-21
5Joe78.0078.0078.0078.0078.0078.0078.0001-Nov-21
6Jeff100.000.000.000.000.000.000.0001-May-21
7John200.000.00100.00150.00200.000.000.0001-Sep-21
Data
Cell Formulas
RangeFormula
I2:I7I2=LOOKUP(2,1/(B2:H2>0),$B$1:$H$1)
 
Upvote 0
Awesome, that worked! Can you explain the logic behind the formula?
 
Upvote 0
The lookup find the first cell right to left that is greater than 0 & return the relevant header value.
 
Upvote 0
Is there a way to exclude the last two columns from the search or anything like that without having to adjust the formula each month?
 
Upvote 0
As long as the last two columns are either 0 or blank, there is no need to change anything.
 
Upvote 0
Surely if they are greater than 0 then that would be the last payment?
 
Upvote 0
But because there are forecasts into the future it even goes into periods for which payments have not been collected yet.
 
Upvote 0
Then how do you decide which is the last column that should be looked at?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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