Find A Value based on multiple columns and single cells with data separated by a comma

Lynderlou

New Member
Joined
Feb 8, 2018
Messages
5
Hi

I have a spreadsheet with a set of criteria in it. I have called it table 1

I have a second set of data I will call Table 2.

I would like to be able to insert the appropriate value in the PRICE column in table 2 based on the criteria listed in table 1 and matching it to a set of values found in table 1 vs 2. Perhaps just showing what I am trying to do is best as I think I am not being clear in my description. Any help would be appreciated
Table 1Table 2
Output
NameCarYearPriceNameCar YearPrice
MarkAltima200810000MarkAltima2008
Mark, TomCamry20105000MarkCamry2010
John, TomModel X201111000TomCamry2010
TonyAltima20088000JohnModel X2011
JohnF-150201620000TomModel X2011
TonyAltima2008
JohnF-1502016

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

<tbody>
</tbody>
 

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.
Hello!

Try this formula in I4 and copy down:

=SUMPRODUCT(--ISNUMBER(SEARCH(" "&$F4&" "," "&SUBSTITUTE($A$4:$A$8,",","")&" ")),--($B$4:$B$8=$G4),--($C$4:$C$8=$H4),$D$4:$D$8)

ABCDEFGHIJ
1Table 1Table 2
2Output
3NameCarYearPriceNameCarYearPrice
4MarkAltima200810000MarkAltima200810000
5Mark, TomCamry20105000MarkCamry20105000
6John, TomModel X201111000TomCamry20105000
7TonyAltima20088000JohnModel X201111000
8JohnF-150201620000TomModel X201111000
9TonyAltima20088000
10JohnF-150201620000
**********************************************'*********************************************

<tbody>
</tbody>

I hope this helps.

Markmzz
 
Upvote 0
Row\Col
C​
D​
E​
F​
K​
L​
M​
N​
1​
Output
2​
NameCarYearPriceNameCarYearPrice
3​
MarkAltima
2008
10000
MarkAltima
2008
10000
4​
Mark, TomCamry
2010
5000
MarkCamry
2010
5000
5​
John, TomModel X
2011
11000
TomCamry
2010
5000
6​
TonyAltima
2008
8000
JohnModel X
2011
11000
7​
JohnF-150
2016
20000
TomModel X
2011
11000
8​
Dow, TomCamry
2010
1,000,000
TonyAltima
2008
8000
9​
JohnF-150
2016
20000

In N3 control+shift+enter, not just enter, and copy down:

=INDEX($F$3:$F$8,MATCH(M3,IF(ISNUMBER(SEARCH(","&K3&",",","&SUBSTITUTE($C$3:$C$8," ","")&",")),IF($D$3:$D$8=L3,$E$3:$E$8)),0))
 
Upvote 0
Try this new formulas too:

Normal Formula

=SUMPRODUCT(--ISNUMBER(SEARCH(", "&F4&", ",", "&$A$4:$A$8&", ")),--($B$4:$B$8=G4),--($C$4:$C$8=H4),$D$4:$D$8)

Array Formula (use Ctrl+Shift+Enter and not only Enter to enter the formula)

=SUM(ISNUMBER(SEARCH(", "&F4&", ",", "&IF($B$4:$B$8=G4,IF($C$4:$C$8=H4,$A$4:$A$8))&", "))*$D$4:$D$8)

Markmzz
 
Last edited:
Upvote 0
Hello!

Try this formula in I4 and copy down:

=SUMPRODUCT(--ISNUMBER(SEARCH(" "&$F4&" "," "&SUBSTITUTE($A$4:$A$8,",","")&" ")),--($B$4:$B$8=$G4),--($C$4:$C$8=$H4),$D$4:$D$8)

ABCDEFGHIJ
1Table 1Table 2
2Output
3NameCarYearPriceNameCarYearPrice
4MarkAltima200810000MarkAltima200810000
5Mark, TomCamry20105000MarkCamry20105000
6John, TomModel X201111000TomCamry20105000
7TonyAltima20088000JohnModel X201111000
8JohnF-150201620000TomModel X201111000
9TonyAltima20088000
10JohnF-150201620000
**********************************************'*********************************************

<tbody>
</tbody>

I hope this helps.

Markmzz

Hi Markmzz - This helped but....I pasted the formula into I4, when I copied it down all the results were the same (10000). But if I look at the formula for each cell, the formula box shows what the correct value should have been and once I close the formula box it places the correct value into the cell. I'm not sure why the formula copied correctly but the values remained the same until I examined each formula. I grabbed the bottom right corner of I4 and dragged it I10 to do the copy.
 
Upvote 0
Hi Markmzz - This helped but....I pasted the formula into I4, when I copied it down all the results were the same (10000). But if I look at the formula for each cell, the formula box shows what the correct value should have been and once I close the formula box it places the correct value into the cell. I'm not sure why the formula copied correctly but the values remained the same until I examined each formula. I grabbed the bottom right corner of I4 and dragged it I10 to do the copy.

Hi Lynderlou,

I didn't understand. Here all is ok.

Try the formula below and tell me if it works for you:

=SUMPRODUCT(--ISNUMBER(SEARCH(", "&F4&", ",", "&$A$4:$A$8&", ")),--($B$4:$B$8=G4),--($C$4:$C$8=H4),$D$4:$D$8)

Markmzz
 
Last edited:
Upvote 0
Hi Markmzz - Ok I dresearched some more and found if I have all the cells highlighted when I enter the formula into the formula bar and hit CTL-Enter. All values are correctly inserted.

Thanks for your help with this!
 
Upvote 0
This formula gave me the same results but if I highlight all cells first and the enter the formula with a CTL-Enter, it also populates the correct values
 
Upvote 0
This formula gave me the same results but if I highlight all cells first and the enter the formula with a CTL-Enter, it also populates the correct values

Hi again,

I think I found the problem.

Maybe the Calculation Options is setup to Manual.

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,111
Messages
6,128,898
Members
449,477
Latest member
panjongshing

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