Excel Masters Please Help

The #1 community for Gun Owners in Indiana

Member Benefits:

  • Fewer Ads!
  • Discuss all aspects of firearm ownership
  • Discuss anti-gun legislation
  • Buy, sell, and trade in the classified section
  • Chat with Local gun shops, ranges, trainers & other businesses
  • Discover free outdoor shooting areas
  • View up to date on firearm-related events
  • Share photos & video with other members
  • ...and so much more!
  • aclark

    Master
    Rating - 100%
    21   0   0
    Apr 22, 2009
    3,715
    63
    The 219
    I have two excel files that I'd like to merge as easily as possible rather than going row by row. The data on one is sales YTD and the data on the other is sales on a Rolling 12 month. I have some items that have been sold to an account on a R12, that haven't been sold YTD so my rows don't line up perfectly. I am hoping there's a way for Excel to figure this out, and match the first column up to fill in the data. I'll try to show below....

    File 1
    File 2
    Account 1Item 15 Account 1Item 18
    Account 1Item 23 Account 1Item 35
    Account 1
    Item 34 Account 2Item 11
    Account 2Item 18

    How I'd like the final file to look

    FINAL FILE
    Account 1Item 158
    Account 1Item 23
    Account 1Item 345
    Account 2Item 181
     

    maansmit

    Grandmaster
    Rating - 100%
    22   0   0
    Aug 12, 2014
    5,743
    38
    Greenfield
    I have two excel files that I'd like to merge as easily as possible rather than going row by row. The data on one is sales YTD and the data on the other is sales on a Rolling 12 month. I have some items that have been sold to an account on a R12, that haven't been sold YTD so my rows don't line up perfectly. I am hoping there's a way for Excel to figure this out, and match the first column up to fill in the data. I'll try to show below....

    File 1File 2
    Account 1Item 15Account 1Item 18
    Account 1Item 23Account 1Item 35
    Account 1Item 34Account 2Item 11
    Account 2Item 18

    How I'd like the final file to look

    FINAL FILE
    Account 1Item 158
    Account 1Item 23
    Account 1Item 345
    Account 2Item 181


    Should be able to use a vlookup to pull the data from file #2 into file #1.

    Feel free to shoot me a PM if you have questions.
     
    Last edited:

    russc2542

    Master
    Rating - 100%
    24   0   0
    Oct 24, 2015
    2,134
    83
    Columbus
    Yes, there are several ways it could be done. user actions, formulas, crazy formulas, vba scripting. which works best depends on how big the X and Y dimensions are.

    Also open to PMs.
     

    HHollow

    Marksman
    Rating - 0%
    0   0   0
    Jul 29, 2012
    276
    43
    Past the file 2 data at the end of file 1. Then use Data/Sort to put the rows in oder of account.
     

    aclark

    Master
    Rating - 100%
    21   0   0
    Apr 22, 2009
    3,715
    63
    The 219
    Yes, there are several ways it could be done. user actions, formulas, crazy formulas, vba scripting. which works best depends on how big the X and Y dimensions are.

    Also open to PMs.

    Both files have 3 columns. I run the report for multiple accounts, the longest having about 320 rows. Not very big files, but will eventually grow over time. I can upload example files if that would help.

    File 1
    AccountCases YTD TYCases YTD LY
    File 2
    AccountCases R12 TYCases R12 LY

    Final File
    AccountCases YTD TYCases YTD LYCases R12 TYCases R12 LY
     

    searpinski

    Expert
    Rating - 0%
    0   0   0
    Jan 21, 2013
    968
    18
    Indianapolis
    Are you looking to do it once (combine the files for good) or more of an active thing where your one master file can combine the two other files as needed?
     

    poptab

    Master
    Rating - 0%
    0   0   0
    Aug 12, 2012
    1,749
    48
    Code:
    SELECT file_1.account AS account, 
           file_1.item AS item, 
           file_1.value AS value_1,
           file_2.value AS value_2 FROM file_1
        LEFT JOIN file_2 AS file_2 ON (file_1.account = file_2.account AND file_1.item = file_2.item)
        ORDER BY file_1.account

    edit: add order by
     
    Top Bottom