• 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

    • Microsoft brings Planner Agent to all Microsoft 365 Copilot users by Ivan Jenic Image: Microsoft Microsoft has announced that Planner Agent in Microsoft 365 Copilot is now generally available to all users with a Microsoft 365 Copilot license. Planner Agent is the latest addition in the string of AI features that Microsoft is implementing across virtually all of its products. The agent lets you manage tasks through natural language prompts directly inside Microsoft 365 Copilot. You can create and update tasks, check priorities, and get insights about current entries without leaving the chat interface. The general availability release comes with a handful of new additions on top of what was available during the initial rollout. A new plan picker lets you search and filter your plans by name, then update task names, statuses, due dates, or priorities through the agent. There's also a goals bucket now, which lets you group tasks under specific goals. This builds on the Goals view, a feature that was introduced as part of the broader Planner refresh that rolled out earlier. Image: Microsoft | Planner Agent in Microsoft 365 Copilot All AI-generated plans and tasks are created in draft mode by default, so you can review and approve changes before anything goes through. This is actually a thoughtful safety feature, because trusting AI to handle all your tasks without a human in the loop is usually a recipe for disaster. Having tasks initially saved as drafts is the best possible middle ground. Microsoft also says that not all tasks are executed equally. Simple tasks get processed quickly, while more complex ones, like building a plan from a Word, Excel, or PowerPoint file, are handed to a more capable model. Microsoft says this approach delivers the best performance, but it could also help with usage management, as you won't have to waste tokens on performing simple tasks. Planner Agent is available now across Teams, Loop, SharePoint, and other Microsoft 365 apps for anyone on a Microsoft 365 Copilot subscription.
    • To be clear I'm anti trump, the bigger point is why review this game at all?
    • Trillion dollar Microsoft has to reduce spending by hurting more people. Good job Microsoft. Good Job Asha.
    • That's a shame. The big Xbox reset when Phil and Sarah left and then Asha came on and brought a new team of executives, and all the layoffs last year and saying that the ABK merger wouldn't result in redundancies I am surprised they are calling for yet another reset and yet more layoffs.
    • Arkane, Ninja Theory, and Double Fine might be on the chopping block too.
  • Recent Achievements

    • First Post
      Cosminus earned a badge
      First Post
    • 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
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      +Edouard
      194
    3. 3
      PsYcHoKiLLa
      125
    4. 4
      Steven P.
      87
    5. 5
      neufuse
      73
  • Tell a friend

    Love Neowin? Tell a friend!