Help with searching a multiple column spreadsheet for closest matching rows

Compuzed

New Member
Joined
Feb 14, 2018
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Help - I am just starting down the road of using complex formulas and am a serious newbie - but this one has me hooped.
I have a 4 column spreadsheet ( Year, DCPD, Make, and Model).
What I need to do is be able to enter the Year, Make and Model ( built from a pull down list of the values within each column) and then find the closes resultant value for the DCPD column - if that makes sense. I do have the spreadsheet but I dont want to post the whole thing, but I could if it is needed. I think the explanation is quite clear, but I could be wrong... ? Thanks in advance !
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
do you have excel 2021 or 365 ?
A small example with the XL2BB-tool is a great help.
 
Upvote 0
do you have excel 2021 or 365 ?
A small example with the XL2BB-tool is a great help.
I do not have the permissions necessary to install that tool; although it would simplify the explanation. Here is a sample of the data I have to work with. I would like to be able to setup a query on this sheet, asking for year, make and model, and display its corresponding data from the DCPD column. If no match is exactly found ( which will happen with newer cars), then it would return the DCPD valued from the next lowest years value for the same make and model. Hope that makes sense?
 

Attachments

  • Sample of Data.JPG
    Sample of Data.JPG
    146.3 KB · Views: 8
Upvote 0
@Compuzed What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
compuzed.xlsx
compuzed.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
112345678910111213
2
3yearrowcollisioncompDCPDAB MakeModelyearMakeModelDCPDcollisioncomprow
420164981582toyotamodel_2maketoyota2016toyotamodel_292376045
520105729882toyotamodel_1modelModel_22016toyotamodel_28298154
620166641421toyotamodel_3year20162016toyotamodel_273965670
720027345662toyotamodel_3
820158863359toyotamodel_2The 3 best 'DCPD'-cars of make toyota, model Model_2, Year 2016
920029521537toyotamodel_3
10201210981867toyotamodel_1
11201211782560toyotamodel_3
12200212696339toyotamodel_1
Blad1
Cell Formulas
RangeFormula
A1:M1A1=COLUMN()
S4:Y6S4=IFERROR(INDEX(SORT(FILTER(MyData,(MyMakes=make)*(MyModels=model)*(MyYears=year)),7,-1),SEQUENCE(3),TRANSPOSE({1;11;13;7;3;5;2})),"-")
S8S8="The 3 best 'DCPD'-cars of make " &make & ", model " & model & ", Year " &year
B4:B12B4=ROW()
Dynamic array formulas.
Named Ranges
NameRefers ToCells
make=Blad1!$Q$4S8, S4
model=Blad1!$Q$5S8, S4
year=Blad1!$Q$6S8, S4
 
Upvote 0
sorry, guess I was not clear. In 3 data entry spots, I want to enter the Year, Make and Model. The formula will then return the nearest DCPD value based on the resultant lookup. Does that explain it better.
For instance, I just did one where I needed to find the value of a 2018 Chev Impala... and I need to find the DCPD value for that corresponding row, or the next closest to it.
 
Upvote 0
same link
compuzed.xlsx
EFGHIJKLMNOPQRSTUVWXYZ
1567891011121314
2
3compDCPDAB MakeModel∆|DCPD|yearMakeModelDCPDcollisioncomprow
41582toyotamodel_232maketoyota2016toyotamodel_247858164
59882toyotamodel_132modelModel_22016toyotamodel_273965670
61421toyotamodel_329year20162016toyotamodel_28298154
75662toyotamodel_312DCPD502016toyotamodel_292376045
83359toyotamodel_29-------
91537toyotamodel_313
101867toyotamodel_117
Blad1
Cell Formulas
RangeFormula
E1:M1E1=COLUMN()
S4:Y8S4=IFERROR(INDEX(SORT(FILTER(MyData,(MyMakes=make)*(MyModels=model)*(MyYears=year)),14,1),SEQUENCE(5),TRANSPOSE({1;11;13;7;3;5;2})),"-")
N4:N10N4=ABS(G4-$Q$7)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
make=Blad1!$Q$4S4
model=Blad1!$Q$5S4
year=Blad1!$Q$6S4
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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