• 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

    • Absolutely 👍
    • Exactly what I was thinking. All of a sudden in span of a month multiple CEO's from scam altman to this clown has had sudden change of heart does not seem organic change lol
    • Microsoft releases Visual Studio Code 1.124 with smarter autonomous AI agents by Paul Hill Microsoft has just released Visual Studio Code 1.124 with a focus on faster agent workflows and improved agent autonomy. Microsoft outlined the following features as the key items in this update: Autopilot: Autopilot, enabled by default, is now smarter to determine when a task is truly done. Background sessions: Quickly send a request in the background and keep composing the next session. Session navigation: Search, jump, and step through agent sessions with the keyboard. Browser history: Revisit and search pages you've already opened in the integrated browser. With VS Code 1.124, Microsoft has enabled Autopilot by default. For those that don’t know, Autopilot is a chat permission level that you can pick to give agents permission to take initiative and act autonomously, without needing explicit user approval for each action. Also related to Autopilot, Microsoft introduced Advanced Autopilot, which changes how Autopilot decides when to keep iterating and when to finish. This helps you get more complete results without manually monitoring loops. This feature works using a small utility model that reads a transcript of the chat and decides when the task is done. Another new feature in 1.124 is the Agents window, which lets you easily explore, iterate on, and review agent sessions across projects and machines. Previously, starting a new agent session meant waiting for it to load before you could compose the next one. With this update, sessions can be requested in the background. This VS Code update also brings session navigation updates to switch between them more quickly. The update also lets you reload or reopen the Agents window so that it no longer loses your layout, so you will land back where you left off. If you use the integrated browser in VS Code, you will notice that it now retains the history of visited pages. Suggestions will now show when typing in the URL bar and can be managed by using Ctrl+H within a browser tab. The browser now also lets you customize the toolbar more; just right-click on the toolbar area to the right of the URL input. Finally, the browser has faster agentic text entry. Another improvement is experimental enterprise-managed Copilot plugin policies that allow admins to centrally control which chat plugins and plugin marketplaces are available to developers. If you have VS Code installed, 1.124 should install automatically, or you'll get a prompt. If you don't have it installed, get it here.
  • Recent Achievements

    • First Post
      X-No-file earned a badge
      First Post
    • One Month Later
      johnjacobb40 earned a badge
      One Month Later
    • One Year In
      Primer1st earned a badge
      One Year In
    • Experienced
      JayZJay went up a rank
      Experienced
    • Reacting Well
      Sir_Timbit earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      513
    2. 2
      PsYcHoKiLLa
      218
    3. 3
      +Edouard
      145
    4. 4
      Steven P.
      87
    5. 5
      ATLien_0
      86
  • Tell a friend

    Love Neowin? Tell a friend!