• 0

excel data


Question

I have data in two separate Excel files.

Excel 1: column:> Location - Code - weight

Excel 2 : column:> Location - Code - weight

I want to dump data in a new Excel file for common Location in these Excel file but code and weight will be from Excel 2 only.

Is there any tool which could help to do this ?

Link to comment
https://www.neowin.net/forum/topic/1134316-excel-data/
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Just matching on Location?

Yes.

is Location unique -

Yes

Please see this Sample data:

----------------

Excel 1:

-----------

Location ------Code-----Weight

Paris 12 40

Germany 15 25

Africa 17 15

Excel 2:

-------------

Location ------Code-----Weight

Paris 78 34

Spain 15 25

Madrid 24 54

As you see Paris is a common location in this two excel , I'll pick it but code and weight will be from Excel 2 .

so new Excel will dump this data ..

New Excel:

---------------------

Location ------Code-----Weight

Paris 78 34

I have more than 15000 data in these excels which I need to compare and pick and have to put in a new excel through this logic. Please suggest me a workaround

Either way, you can do this easily using the match function.

How ??

Link to comment
https://www.neowin.net/forum/topic/1134316-excel-data/#findComment-595496700
Share on other sites

  • 0

Apologies for the delay, but here's how I'd do it:

  1. In your third workbook, use a formula to read the values of Location, something similar to:
    ='[Excel 1.xlsx]Sheet1'!$A2

    This will be your 'base' set of values to check against.

  2. Have an additional second column using match() to check if this Location exists in the second workbook. Something similar to:
    =MATCH(A2,'[Excel 2.xlsx]Sheet1'!$A:$A,0)

    This returns either the location in the array the exact value (the third argument means 'exact') is found or #N/A if not found.

  3. For Code and Weight, check if the value found above is a number, if so use to OFFSET(). Code for 'Code'
    =IF(ISNUMBER(B2),OFFSET('[Excel 2.xlsx]Sheet1'!$B$1,B2,0)-1,"NOT FOUND")

    Weight is similar.

  4. Once you've done this, filter your results based on either 'Found', 'Code' or 'Weight' to filter just those that were found.

I've attached the workbooks as an example:

Excels.zip

NB1: For this to work, have all of your workbooks open, I'm unsure on your excel prowess but it's easier to construct these formulas by having them all open and the windows tiled. That way you can construct the references to external workbooks by clicking as you would any other formula references.

NB2: This would probably be neater (although not sure about quicker) to do as a macro that loops through all columns in one cell, and only grabs the values from Excel 2 if it exists. However, this seemed a little easier to try and explain.

Hope this helps.

Link to comment
https://www.neowin.net/forum/topic/1134316-excel-data/#findComment-595498266
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Uhm, that's every business ever, though. It doesn't matter if a bajillion users are using it. As long as it's not making bank, it's probably headed for the graveyard.
    • Yeah Patchou was an active member here, good ol' times indeed.
    • Samsung is the new Google... they don't care if millions of people are using it.
    • Still no word on Tides of Annihilation...... so weird that it wasn't shown at the big Game Fest. Guess I'll put it in the bin like Judas and Squadron 42.
    • Samsung is shutting down yet another app used by millions by David Uzondu Samsung has announced that it is shutting down Samsung Max, its VPN service used by more than 50 million people, effective today. Samsung Max VPN, if you don't know, was an Android app born on February 23, 2018, out of the ashes of Opera Max, a very popular data-saving VPN that Opera had discontinued the previous year. Samsung bought the discontinued service, rebranded it, and added a native Samsung UI to fit the Galaxy ecosystem. The app could do things like compress images, help you manage background data on a per-app basis, reduce video data consumption, shrink music files, optimize webpages, block advertisement trackers in incognito mode, and encrypt your internet traffic on public Wi-Fi networks. Image via SammyGuru If you open the app now, you'd be greeted by a shutdown banner warning that all VPN, data saving, and privacy services stopped functioning on June 15, 2026. The creators failed to provide a reason for the shutdown, instead publishing a farewell note that read: "Thank you for being with us over the years. Your support and activity truly meant a lot to us and helped shape this app into what it became." This same message appears on the Google Play Store listing for the app as well. Max VPN is the latest service from Samsung to join the list of discontinued applications from the company. Just two months ago, the Korean tech giant announced that it is completely shutting down Samsung Messages, forcing millions of users to migrate to Google Messages by next month. The only devices that the shutdown won't affect are older smartphones running Android 11 or lower. Some of the features of Google Messages that Samsung hopes will entice users include AI-powered scam detection to block suspicious links, integrated Gemini AI tools to generate quick replies, custom chat bubbles, and universal RCS compatibility for sharing high-quality media with iOS users. The platform also offers seamless syncing across tablets and smartwatches. In addition to that, users gain access to message scheduling, smart classification, and automated category sorting. Via: SammyGuru
  • Recent Achievements

    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
  • Popular Contributors

    1. 1
      +primortal
      500
    2. 2
      +Edouard
      195
    3. 3
      PsYcHoKiLLa
      125
    4. 4
      Steven P.
      85
    5. 5
      neufuse
      73
  • Tell a friend

    Love Neowin? Tell a friend!