+ Reply to Thread
Results 1 to 4 of 4

Merging two sheets

  1. #1
    Registered User
    Join Date
    07-03-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    2

    Merging two sheets

    Hi,

    I have two sheets of data i need to merge and . Sheet1 contains sales information (columns A-D), Saleid, RecordID, Customer and SaleDate.

    Sheet two contains information the date in column A, and B -J holds promotions and discount information that we would have run on that date.

    I need to merge the two together using the date as the key identifier. When i use MS query i loose around 90% of the data on Sheet1. Does anyone have any other suggestions?

    Thanks In Advance,

    Bruce
    Attached Images Attached Images

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Merging two sheets

    How can you use the date as key identifier when your first sheet has multiple rows for a specific date? Do you want all those rows combined to a single row with the combined data (plus B to J) of the other sheet?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Merging two sheets

    Hi Bruce and welcome to the forum,

    I think you only get 10% because you have a relationship between the two sheets that is NOT exact. If you try to match your "Sales Date" field, the time is included in the match.

    I suggest you use a combination of fields to do the match or perhaps a rounding of the date field to eliminate the time.

    If you can supply a sample workbook, we could be of more help.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    07-03-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    2

    Thumbs up Re: Merging two sheets

    Hi Both,

    Thank you for your quick responses.

    It was as identified by MarvinP, the additional time stamp that was causing the fallout of data.

    Having removed the time from the cell, I now have the 13000+ lines I was expecting to see.

    Thanks Again,

    Bruce

+ 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. Merging: displaying which sheet data comes from when merging sheets
    By zed commander in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-12-2012, 12:20 PM
  2. Merging Sheets
    By cj21 in forum Excel General
    Replies: 3
    Last Post: 06-23-2011, 06:58 AM
  3. Merging 2 sheets
    By rds207 in forum Excel General
    Replies: 1
    Last Post: 09-17-2009, 03:53 PM
  4. Merging 2 sheets
    By rds207 in forum Excel General
    Replies: 7
    Last Post: 09-11-2009, 12:07 AM
  5. Merging sheets
    By milleroy in forum Excel General
    Replies: 1
    Last Post: 05-29-2008, 09:41 AM
  6. Merging two sheets
    By Dhruva101 in forum Excel General
    Replies: 2
    Last Post: 08-24-2006, 12:49 PM
  7. merging sheets
    By b166er in forum Excel General
    Replies: 1
    Last Post: 08-06-2006, 06:00 PM
  8. merging sheets
    By b166er in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-06-2006, 12:48 PM

Tags for this Thread

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