Find matching value in large table and return associated data

Sirod

New Member
Joined
Aug 6, 2009
Messages
47
Hello,
I have a large spread sheet that lists multiple currencyvalues. For each value there is anassociated daily fee, weekly fee, and monthly fee.
For example:


Value
Daily Rate
Weekly Rate
Monthly Rate

Value
Daily Rate
Weekly Rate
Monthly Rate
Value
Daily Rate
Weekly Rate
Monthly Rate
$3,050
$ 4.27
$ 71.36
$ 45.43
$7,202
$ 6.60
$ 83.02
$ 96.14
$1,355
$ 8.94
$ 94.68
$ 46.86
$5,506
$ 0.04
$ 50.18
$ 53.29
$9,281
$ 2.16
$ 60.78

$ 99.40
$3,056
$ 4.28
$ 71.38
$ 45.50
$8,642
$ 6.18
$ 30.91
$ 69.46
$2,075
$ 8.11
$ 40.55
$ 11.39
$5,507
$ 0.04
$ 50.18
$ 53.30
$2,374
$ 2.66
$ 13.31
$ 92.90
$5,493
$ 4.41
$ 22.07
$ 31.00
$8,612
$ 6.17
$ 30.83
$ 69.09
$6,706
$ 9.63
$ 8.15
$ 26.93
$9,541
$ 1.07
$ 5.36
$ 58.30
$2,376
$ 2.66
$ 13.32
$ 92.93

<tbody>
</tbody>


In a separate location I want to be able to manually enter aspecific value and have excel search the table to find that value and thenreturn the applicable daily fee, weekly fee, and monthly fee. For example:


Value:
$2,075
<- this value will be manually entered
Daily Rate:
$8.11
Weekly Rate:
$40.55
Monthly Rate:
$11.39

<tbody>
</tbody>


It is not an option to simply combine the different valueand fee columns into one for each. I amunable to make changes to the table listing the values and fees.

Please no VBA or array formulas.

Thank you,

S




 

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.
If you are willing to try a macro, it can be very easily done. All you would have to do is enter a specific value in a cell and press the RETURN key. If you are willing to try, I would need to know the cell where you will enter a specific value. Also, is there a possibility that the specific value has more than one occurrence?
 
Last edited:
Upvote 0
Are there only 3 different columns for the Value? If yes then you can use this nested iferror index match combination: (I have assumed the data to be in cells A1:L6 - from the table you created in initial post, change ranges accordingly):

Daily Rate:
IFERROR(INDEX($A$1:$L$6,MATCH($P$2,$A$1:$A$6,FALSE),2),IFERROR(INDEX($A$1:$L$6,MATCH($P$2,$E$1:$E$6,FALSE),6),INDEX($A$1:$L$6,MATCH($P$2,$I$1:$I$6,FALSE),10)))

Weekly Rate:
IFERROR(INDEX($A$1:$L$6,MATCH($P$2,$A$1:$A$6,FALSE),3),IFERROR(INDEX($A$1:$L$6,MATCH($P$2,$E$1:$E$6,FALSE),7),INDEX($A$1:$L$6,MATCH($P$2,$I$1:$I$6,FALSE),11)))

Monthly Rate:
IFERROR(INDEX($A$1:$L$6,MATCH($P$2,$A$1:$A$6,FALSE),4),IFERROR(INDEX($A$1:$L$6,MATCH($P$2,$E$1:$E$6,FALSE),8),INDEX($A$1:$L$6,MATCH($P$2,$I$1:$I$6,FALSE),12)))

Where P2 is the cell I entered the Value into, with a test value of 2075 I get the following:
Daily Rate: 8.11
Weekly Rate: 40.55
Monthly Rate: 11.39
 
Upvote 0
Here is a VBA option even though you didn't want one. It may be helpful in the future for others to understand. BTW--what do you have against vba solutions if they make life easier and cleaner.

Code:
Option Explicit


Sub CurrencyFind()
    Dim c As Range, lr As Long
    Dim rng As Range, d As Currency, w As Currency, m As Currency
    Dim crit As Currency
    lr = Range("A" & Rows.Count).End(xlUp).Row
    Set rng = Range("A2:I" & lr)
    crit = InputBox("What Value to search?")
    For Each c In rng
        If c = crit Then
            d = c.Offset(, 1)
            w = c.Offset(, 2)
            m = c.Offset(, 3)
        End If
    Next c
    MsgBox ("Rates are " & d & ", " & w & ", " & m)
End Sub
 
Last edited:
Upvote 0
Assuming your Data starts in cell A1 with only 4 columns and your input cell being B25 (Change the range from 15 and the input cell to whatever applies to your sheet)

Daily Rate : =IFERROR(INDEX($B$2:$B$15,AGGREGATE(15,6,((ROW($A$2:$A$15)-ROW($A$2)+1))/(($A$2:$A$15=$B$25)),ROWS($A$1:A1))),"")
Weekly Rate : =IFERROR(INDEX($C$2:$C$15,AGGREGATE(15,6,((ROW($A$2:$A$15)-ROW($A$2)+1))/(($A$2:$A$15=$B$25)),ROWS($A$1:A1))),"")
Monthly Rate : =IFERROR(INDEX($D$2:$D$15,AGGREGATE(15,6,((ROW($A$2:$A$15)-ROW($A$2)+1))/(($A$2:$A$15=$B$25)),ROWS($A$1:A1))),"")
 
Last edited:
Upvote 0
Try this array formulas

<b>Hoja3</b><br /><br /><table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:89.35px;" /><col style="width:66.53px;" /><col style="width:81.74px;" /><col style="width:89.35px;" /><col style="width:60.83px;" /><col style="width:66.53px;" /><col style="width:81.74px;" /><col style="width:86.5px;" /><col style="width:60.83px;" /><col style="width:66.53px;" /><col style="width:81.74px;" /><col style="width:86.5px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td><td >J</td><td >K</td><td >L</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="background-color:#92d050; ">Value</td><td style="background-color:#92d050; ">Daily Rate</td><td style="background-color:#92d050; ">Weekly Rate</td><td style="background-color:#92d050; ">Monthly Rate </td><td style="background-color:#92d050; ">Value</td><td style="background-color:#92d050; ">Daily Rate</td><td style="background-color:#92d050; ">Weekly Rate</td><td style="background-color:#92d050; ">Monthly Rate</td><td style="background-color:#92d050; ">Value</td><td style="background-color:#92d050; ">Daily Rate</td><td style="background-color:#92d050; ">Weekly Rate</td><td style="background-color:#92d050; ">Monthly Rate</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="text-align:right; ">$3,050.00</td><td style="text-align:right; ">$4.27</td><td style="text-align:right; ">$71.36</td><td style="text-align:right; ">$45.43</td><td style="text-align:right; ">$7,202.00</td><td style="text-align:right; ">$6.60</td><td style="text-align:right; ">$83.02</td><td style="text-align:right; ">$96.14</td><td style="text-align:right; ">$1,355.00</td><td style="text-align:right; ">$8.94</td><td style="text-align:right; ">$94.68</td><td style="text-align:right; ">$46.86</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="text-align:right; ">$5,506.00</td><td style="text-align:right; ">$0.04</td><td style="text-align:right; ">$50.18</td><td style="text-align:right; ">$53.29</td><td style="text-align:right; ">$9,281.00</td><td style="text-align:right; ">$2.16</td><td style="text-align:right; ">$60.78</td><td style="text-align:right; ">$99.40</td><td style="text-align:right; ">$3,056.00</td><td style="text-align:right; ">$4.28</td><td style="text-align:right; ">$71.38</td><td style="text-align:right; ">$45.50</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="text-align:right; ">$8,642.00</td><td style="text-align:right; ">$6.18</td><td style="text-align:right; ">$30.91</td><td style="text-align:right; ">$69.46</td><td style="background-color:#ffff00; text-align:right; ">$2,075.00</td><td style="background-color:#b8cce4; text-align:right; ">$8.11</td><td style="background-color:#b8cce4; text-align:right; ">$40.55</td><td style="background-color:#b8cce4; text-align:right; ">$11.39</td><td style="text-align:right; ">$5,507.00</td><td style="text-align:right; ">$0.04</td><td style="text-align:right; ">$50.18</td><td style="text-align:right; ">$53.30</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="text-align:right; ">$2,374.00</td><td style="text-align:right; ">$2.66</td><td style="text-align:right; ">$13.31</td><td style="text-align:right; ">$92.90</td><td style="text-align:right; ">$5,493.00</td><td style="text-align:right; ">$4.41</td><td style="text-align:right; ">$22.07</td><td style="text-align:right; ">$31.00</td><td style="text-align:right; ">$8,612.00</td><td style="text-align:right; ">$6.17</td><td style="text-align:right; ">$30.83</td><td style="text-align:right; ">$69.09</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="text-align:right; ">$6,706.00</td><td style="text-align:right; ">$9.63</td><td style="text-align:right; ">$8.15</td><td style="text-align:right; ">$26.93</td><td style="text-align:right; ">$9,541.00</td><td style="text-align:right; ">$1.07</td><td style="text-align:right; ">$5.36</td><td style="text-align:right; ">$58.30</td><td style="text-align:right; ">$2,376.00</td><td style="text-align:right; ">$2.66</td><td style="text-align:right; ">$13.32</td><td style="text-align:right; ">$92.93</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td >Value:</td><td style="background-color:#ffff00; text-align:right; ">$2,075.00</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td >Daily Rate:</td><td style="background-color:#b8cce4; text-align:right; ">$8.11</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >11</td><td >Weekly Rate:</td><td style="background-color:#b8cce4; text-align:right; ">$40.55</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >12</td><td >Monthly Rate:</td><td style="background-color:#b8cce4; text-align:right; ">$11.39</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Array Formulas</td></tr><tr><td >B10</td><td >{=MAX(($A$2:$I$6=$B$9)*B$2:J$6)}</td></tr><tr><td >B11</td><td >{=MAX(($A$2:$I$6=$B$9)*C$2:K$6)}</td></tr><tr><td >B12</td><td >{=MAX(($A$2:$I$6=$B$9)*D$2:L$6)}</td></tr></table></td></tr></table>
 
Upvote 0
the same but with "regular" formula

=SUMPRODUCT((A2:I6=B9)*(B2:J6))
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

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