go to next reference

L

Legacy 15162

Guest
If I setup a vlookup statement, how can i create the formula to not return the same value for matching numbers....
for example:
I have 12 pmts of 12.00 posted on the same day. If I have another worksheet that has say, 14 pmts of 12.00 I do not want the reference number to only pull up the first pmt and post it 12 times. I want the formula to find the first pmt and post that reference number then look for the next matching reference number for that pmt.
Also, there may be times when there are 12 pmts of say 10.00 posted on the first wksheet, but only 5 pmts on the second worksheet. How can I have the formula return to the top of the matching reference number?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
More info

Txksa,

I think it might help to give us a bit more info. Particularly about the "reference number". Ie, do all payments have the same reference number. Are there orher payments with other reference numbers? Where are you trying to get these payments placed?

Jim..
 
Upvote 0
thanks paddyd! That actually is a big help....
=INDEX(B5:C19,SMALL(IF(B5:B19=B21,ROW(B5:B19)-ROW(B5)+1,ROW(B19)+1),C21),2)

now, how would i tie this formula together to return the first value, if there is a duplicate, then return the next...and so on.....
 
Upvote 0
By setting up a grid that relates the items on the list to potential number of instances & refering to those values in the formula - see the example:
Book5
ABCDEFGHIJKL
3
4IDNum
5a11234567
6b2a1581014  
7c3b2691115  
8d4c3712    
9a5d413     
10b6
11c7
12a8
13b9
14a10
15b11
16c12
17d13
18a14
19b15
Sheet1



The formula in f6 is:

{=IF(COUNTIF($B$5:$B$19,$E6)>=F$5,INDEX($B$5:$C$19,SMALL(IF($B$5:$B$19=$E6,ROW($B$5:$B$19)-ROW($B$5)+1,ROW($B$19)+1),F$5),2),"")}

...which can be copied across to the rest of the table. Equivalent results could also be achieved using an appropriately constructed pivot table...

paddy
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,310
Members
449,152
Latest member
PressEscape

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