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

Sheet1
Name ID Payment Date
Mike12301/01/2002
Jason11102/01/2002
Mike12305/02/2002
Suzy22216/03/2002
Mike12325/03/2002
Suzy22208/04/2002
Sheet2
Name IDPayment Received
Mike1232
Jason1111
Suzy2222

<colgroup><col span="2"><col></colgroup><tbody>
</tbody>

OUTCOME

Report
12301/01/2002

<colgroup><col span="2"></colgroup><tbody>
</tbody>
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,238
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
this will work if the payment dates are in order as shown

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">Sheet1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Name</td><td style=";">ID</td><td style=";">Payment Date</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Mike</td><td style="text-align: right;;">123</td><td style="text-align: right;;">01/01/2002</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Jason</td><td style="text-align: right;;">111</td><td style="text-align: right;;">02/01/2002</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">Mike</td><td style="text-align: right;;">123</td><td style="text-align: right;;">05/02/2002</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">Suzy</td><td style="text-align: right;;">222</td><td style="text-align: right;;">16/03/2002</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style=";">Mike</td><td style="text-align: right;;">123</td><td style="text-align: right;;">25/03/2002</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style=";">Suzy</td><td style="text-align: right;;">222</td><td style="text-align: right;;">08/04/2002</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style=";">Sheet2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style=";">Name</td><td style=";">ID</td><td style=";">Payment Received</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style=";">Mike</td><td style="text-align: right;;">123</td><td style="text-align: right;;">2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style=";">Jason</td><td style="text-align: right;;">111</td><td style="text-align: right;;">1</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style=";">Suzy</td><td style="text-align: right;;">222</td><td style="text-align: right;;">2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">16</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">17</td><td style=";">OUTCOME</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">18</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">19</td><td style=";">Report</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">20</td><td style="text-align: right;;">123</td><td style="text-align: right;background-color: #C6E0B4;;">05/02/2002</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">21</td><td style="text-align: right;;">111</td><td style="text-align: right;background-color: #C6E0B4;;">02/01/2002</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">22</td><td style="text-align: right;;">222</td><td style="text-align: right;background-color: #C6E0B4;;">08/04/2002</td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B20</th><td style="text-align:left">{=SMALL(<font color="Blue">IF(<font color="Red">$B$3:$B$8=A20,$C$3:$C$8</font>),C12</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />
 

Watch MrExcel Video

Forum statistics

Threads
1,122,228
Messages
5,594,935
Members
413,953
Latest member
Arthur1471

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
Top