Vlookup with specific row count

Shaza

New Member
Joined
Jan 3, 2018
Messages
11
Hi, is it possible to combine vlookup with get value in specific row. Do i need to do macro behind or it can be done with cell formula only. When using vlookup only value in first row retrieve.Example as
=VLOOKUP(B4,B3:C9,2,FALSE)
In scenario below, i want to get payment date result based on payment received, such for example for ID 123 which suppose go to cell second payment date instead of first date payment.

Any help is appreciated.


DATA

[TABLE="width: 252"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Sheet1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD] ID[/TD]
[TD] Payment Date[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]01/01/2002[/TD]
[/TR]
[TR]
[TD]Jason[/TD]
[TD="align: right"]111[/TD]
[TD="align: right"]02/01/2002[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]05/02/2002[/TD]
[/TR]
[TR]
[TD]Suzy[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]16/03/2002[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]25/03/2002[/TD]
[/TR]
[TR]
[TD]Suzy[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]08/04/2002[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sheet2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name [/TD]
[TD] ID[/TD]
[TD]Payment Received[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Jason[/TD]
[TD="align: right"]111[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Suzy[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]2[/TD]
[/TR]
</tbody>[/TABLE]

OUTCOME

[TABLE="width: 150"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Report[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD="align: right"]01/01/2002[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
this will work if the payment dates are in order as shown


Book1
ABC
1Sheet1
2NameIDPayment Date
3Mike12301/01/2002
4Jason11102/01/2002
5Mike12305/02/2002
6Suzy22216/03/2002
7Mike12325/03/2002
8Suzy22208/04/2002
9
10Sheet2
11NameIDPayment Received
12Mike1232
13Jason1111
14Suzy2222
15
16
17OUTCOME
18
19Report
2012305/02/2002
2111102/01/2002
2222208/04/2002
Sheet1
Cell Formulas
RangeFormula
B20{=SMALL(IF($B$3:$B$8=A20,$C$3:$C$8),C12)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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