+ Reply to Thread
Results 1 to 12 of 12

Combining Two Data Sheets

  1. #1
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Combining Two Data Sheets

    I have worked this out on my own via these forums but the current method I use is a huge convoluted mess of VBA and I know there has to be a more efficient way (using VBA / VLOOKUP).

    Basically I a system that keeps a customer list - I export it to excel and it comes with no formatting etc. I format it and I have added some columns on the end with extra data.

    Now, once a day or so I run a new report..the issue is that some of the data changes (sales figures, dates etc). I need to combine my old and new lists keeping formatting, using all the new data but keeping 3 of my columns that I added in the old sheet.

    Yes it's confusing to explain.

    If you check my example spreadsheet maybe it will make more sense.

    Sheet1 is my working list I have added formatting and added columsn O-S
    Sheet2 is the newly exported list and how it looks. So what I need to do is VLOOKUP columns O-R from Sheet1 and add to Sheet2 and then copy the formatting from Sheet 1 to Sheet 2. Basically this combines the two lists keeping columns O-S (or O-R actually..S is just a forumla to parse column K) but taking the new vlues for all the other formulas (from Sheet2)

    Does this even make sense??!?
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Combining Two Data Sheets

    I don't get it can you post an example of what each sheet should look like after the update???
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Combining Two Data Sheets

    Sheet1 is the finished product and what I work with every day.
    Sheet2 is basically the same thing in raw form when I first get my reports.

    The only difference is in Sheet1 I have added columsn O-S...those are things I add in as I contact my customers. Also I have added color formatting in to the whole table (if you look you can see green and red and various colors)

    All I need is Sheet2 to VLOOKUP values fro Sheet1 Columns O-R and then take the formatting from sheet1. Does that make more sense?

    I can do this I just thought it might be too messy.
    If I do it myself it will basically be lots of copy pasting data around and so messy.

    IE My macro loads the new file, pastes in a new sheet, adds the new columns needed O-S - adds the vlookup formulas to those columns. Not sure how to set the formatting though..

    Maybe this is way too hard to explain and maybe I should just use the same method method I used before with lots of macros and vba lol

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Combining Two Data Sheets

    There's no macro in your sample, I might understand if I could see your macro but Columns O & P in sheet2 are a date and a location and sheet1 column P is a date when it's populated at all - what are you matching on for your lookup and where are you putting the results??

  5. #5
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Combining Two Data Sheets

    I had to strip my real file down because of file restriction. My actual file has a ton of modules and sheets.

    I see where your confusion is, I think I accidentally deleted some columns in sheet1. They're supposed to match, I had several columns hidden.

    Basically sheet1 and sheet2 are the same. Let's just say I started from scratch today. I went in my work system and I exported my customer list - it would look just like what you see on Sheet2.

    Then what I did was add columns O-S, they are simply some columns that I can label events on those accounts. Column S is just a parsed email from column K. As the week progresses I add more notes into O-S.
    At some point I need to export a new list from my work system because I get new customers daily, and new orders and the list needs to be up to date.

    So then I need to paste the NEW (sheet2) over the old (sheet1) retaining all the NEW information from the most recent file, but I need to KEEP the added information in Columns O-S.

    I don't know how to explain it any better

    To clear confusion add a new A and B column in Sheet1 labeled Customer and WedID so that it will match sheet2.

    I can figure this out I just know there is probably a better way. The way I will do it involves lots of copy and pasting and blah.

  6. #6
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Combining Two Data Sheets

    I'm going to mark this one as solved as I think I am sorting it out and don't want time wasted on it. I have new related questions will post new threads

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Combining Two Data Sheets

    OK - maybe later!

    Thanks for the rep!

  8. #8
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Combining Two Data Sheets

    Quote Originally Posted by xladept View Post
    OK - maybe later!

    Thanks for the rep!
    Thanks for the help - I did post a different thread. I sorted out some other things and clarified my question in the other post better. It's still similar to this post but not the same so I thought a new thread was better - hehe Thanks again!

  9. #9
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Combining Two Data Sheets

    Hey buddy, can you tell me (without giving me the answer trying to figure something out on my own!) where int he combine code does it determine which COLUMN to stop at?

    My company has added 3 columns so I want to include those but right now the code stops at column P (if I am not mistaken) and ignores everything after, I need to go to column S instead, trying to read the code but am not understanding where that is determined, lol.

    Thanks man, you rock - this form has done WONDERS for our department.

    I should have posted the code since you have done so many codes for me..it's this one
    Please Login or Register  to view this content.
    I am dumb, I am using VLOOKUPS on this form...lol.......... so I just need to add them lol. I thought we had switched to the non VLOOKUP form on this one but that was the other form you helped me with..my bad.
    Last edited by NewYears1978; 07-17-2019 at 11:07 AM.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Combining Two Data Sheets

    There are several versions extant can you post the particular program that you're referencing?

  11. #11
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Combining Two Data Sheets

    I am dumb, I am using VLOOKUPS on this form...lol.......... so I just need to add them lol. I thought we had switched to the non VLOOKUP form on this one but that was the other form you helped me with..my bad.

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Combining Two Data Sheets

    Looks like that one doesn't care how many fields there are as it just updates the first column entry.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help with combining data on different sheets
    By SHAWKINS01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2017, 03:00 PM
  2. Combining data from two sheets
    By Ankka in forum Excel General
    Replies: 1
    Last Post: 05-23-2014, 02:10 PM
  3. Need help with combining Data from 2 sheets
    By Conradforbis in forum Excel General
    Replies: 3
    Last Post: 03-23-2012, 02:43 PM
  4. Need Combining data from two sheets
    By GirlFromOz in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 03-10-2007, 05:31 PM
  5. Combining data from two sheets
    By sparren in forum Excel General
    Replies: 7
    Last Post: 02-10-2007, 03:59 PM
  6. help with combining data from 2 sheets
    By unclegar95 in forum Excel General
    Replies: 2
    Last Post: 10-11-2006, 06:16 AM
  7. Combining data from different sheets in one
    By viktor in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-07-2005, 05:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1