Finding Data in Separate Sheets and Transferring a Specific Value

clayest94

New Member
Joined
Jun 24, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hi all,

I'm new here so go easy on me! I've got two data sets that have the same data on them, in different orders. Here's what I'm looking to do:

I need an if/then function, but I'm not familiar with them. What I need to do is say if D7:G7 (Origin City, Origin State, Destination City, Destination State) on Sheet 1 equals O2:R2 (Origin City, Origin State, Destination City, Destination State) on Sheet 2 are the same, then copy the value from D2 on Sheet 2 to I7 on Sheet 1.

I'm sure this is probably a pretty common function, but I'm just not familiar. Any and all help is appreciated!

Thanks!
--E
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi Clayest94,

Here is Sheet2 in column D sequence

Clayest94.xlsx
DENOPQR
1RateOrigin City Origin State Destination City Destination State
2652LancasterPAJersey CityNJ
3666ElginILGermantownMD
4688KalamazooMITacomaWA
5767HammondINAkronOH
6812San AntonioTXSpringfieldIL
7888AlbanyGAMobileAL
8889ClevelandOHStocktonCA
9900LancasterPACape CoralFL
10922Baton RougeLATroyMI
111200Los AngelesCADallasTX
121211MuskegonMIGreenvilleNC
131322Bowling GreenKYKilleenTX
141455ScrantonPAHuntsvilleAL
152100BristolVAFort WayneIN
162211SacramentoCAGulfportMS
17
Sheet2


Here is Sheet1 with the retrieval formula

Clayest94.xlsx
DEFGHI
1Origin City Origin State Destination City Destination StateRate
2Los AngelesCADallasTX1200
3LancasterPAJersey CityNJ652
4San AntonioTXSpringfieldIL812
5ClevelandOHStocktonCA889
6HammondINAkronOH767
7LancasterPACape CoralFL900
8ElginILGermantownMD666
9Baton RougeLATroyMI922
10AlbanyGAMobileAL888
11MuskegonMIGreenvilleNC1211
12KalamazooMITacomaWA688
13Bowling GreenKYKilleenTX1322
14ScrantonPAHuntsvilleAL1455
15BristolVAFort WayneIN2100
16SacramentoCAGulfportMS2211
Sheet1
Cell Formulas
RangeFormula
I2:I16I2=IFERROR(INDEX(Sheet2!$D$2:$D$9999,MATCH(1,INDEX((Sheet2!$O$2:$O$9999=D2)*(Sheet2!$P$2:$P$9999=E2)*(Sheet2!$Q$2:$Q$9999=F2)*(Sheet2!$R$2:$R$9999=G2),0,1),0)),"No match")
 
Upvote 0
What I need to do is say if D7:G7 (Origin City, Origin State, Destination City, Destination State) on Sheet 1 equals O2:R2 (Origin City, Origin State, Destination City, Destination State) on Sheet 2 are the same, then copy the value from D2 on Sheet 2 to I7 on Sheet 1.

Wont that create duplicated entries in sheet1?
howeever,
if you have sheet1 and sheet2 and you wish to find records (rows) that are in both sheets. then Power query would do it easily :)

just provide data sample to work on.
 
Upvote 0
I had to read this few times.
anyway, isn't that gr8 usage of powerquery then play with formulas?
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,869
Members
449,054
Latest member
juliecooper255

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