Two similar Excel sheets comparison and data filling

angmocummer

New Member
Joined
Nov 17, 2013
Messages
6
Dear friends,

I have 2 system generated Excel files that have certain combinations and prices against those combinations.

The 2 Excel worksheets are based in the following format:

Column A - Unique system generated ID, these IDs are different in both the sheets.
Column B - Pricing Parameter
Column C - Pricing Parameter
Column D - Pricing Parameter
Column E - Pricing Parameter
Column F - Pricing Parameter
Column G - Pricing Parameter
Column H - Pricing information (numerical value)
Column I - Pricing information (numerical value)
Column J - Pricing information (numerical value)
Column K - Pricing information (numerical value)

Both Excel files are identical.

Column A has different values in both the files.
There are several records where columns B through G have identical information. However there are several records that are additional in the second Excel file.

Columns H through K have pricing information that are based on the combinations in columns B through G.

The aim is to copy the prices in H to K based on the combinations of B through G from one sheet to another.

Here is an example of the Excel File - BayFiles

The First Sheet has the "source combinations"
The Second sheet has the "destination combinations"
Formats of both sheets are identical.
Columns A has different IDs in both sheets.
Columns B through G have some identical records. however the second sheet with "Destination Combinations" has records that do not exist in the first sheet "Source Combinations"

If a combination exists in Columns B - G in the first sheet and also exists in the second sheet in Columns B - G, the values from in the first sheet that exist in Columns H - K need to be copied to the second sheet in Columns H - K.
If the combinations do not exist in columns B - G, then off course nothing can be done and those values in the second sheet need to be left blank.

How can I do this? Any fuzzy logic? Any macros? I am trying my best to figure out any way to do this intelligently, copy pasting is really slow. Filtering and copy pasting has its own sets of issues and is very error prone. And it seems that some intelligence can solve this because data is identical, however I lack that! I am an amateur in Excel but I am inclined to search, research, learn and share.

Any help to solve this conundrum will be really helpful.

Really looking forward to your answers.

Thanks for your time.

David.

PS: I am using Excel 2013!
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi David,

Welcome to the board.

You can download the updated file from the below link for your query.

BayFiles

Sanjeev
 
Upvote 0
Hi David,

Welcome to the board.

You can download the updated file from the below link for your query.

BayFiles

Sanjeev

Sanjeev, thank you very much. That was above and beyond what I was expecting. Extremely thankful!

If you don't mind, would want to know/learn as to how to handle a scenario where:

Destination workbook has a combination in Row 2, but the Source workbook has the combination in Row 10, would the program look for the combination until it finds it? If it does not, then in that case it means that both files should have the same sequence. How to get around it?

Thanks again!
 
Upvote 0
Sanjeev, thank you very much. That was above and beyond what I was expecting. Extremely thankful!

If you don't mind, would want to know/learn as to how to handle a scenario where:

Destination workbook has a combination in Row 2, but the Source workbook has the combination in Row 10, would the program look for the combination until it finds it? If it does not, then in that case it means that both files should have the same sequence. How to get around it?

Thanks again!

Hi David,

The reply to your above query is already in the file sent to you. The program will automatically look for the combination in the Source workbook provided you give the right command.

Regards,

Sanjeev
 
Upvote 0

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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