+ Reply to Thread
Results 1 to 43 of 43

Comparing two spreadsheets, matching duplicates question

  1. #1
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Comparing two spreadsheets, matching duplicates question

    Hi. I have a motorcycle inventory of around 150 used bikes that I have to manage. Bikes getting sold, bikes going into inventory then onto our website.

    Here's what I am doing.

    Using two spreadsheets and using conditional formatting to compare our web inventory to our actual inventory. This lets me know what needs to be added to the site, or taken off of the site because it has been sold.

    It's a bit rough though.

    First I get a spreadsheet from our web provider with a bunch of useless info that I don't need.
    Then I seem to have to arrange the two spreadsheets so that the stock numbers that I am comparing are in the same column, in order for conditional formatting to work.

    I would really like to have something prompt me to load (Hard inventory) then another prompt to load (web inventory). And to have an automatic out put with the sold bikes in one category, and the bikes that need to be added in another category.

    Can anyone point me in a direction, I dont even know what this would be called.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi Harleyguy

    Welcome to the fourm.

    This seems do-able; with minimal input if you use some VBA.

    If you would like to upload the format of (a) the stock sheet and (b) the web list, I think I can do something.

    Regards
    Alastair

  3. #3
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    HI I am am unfamiliar with the term VBA, and where exactly should I upload the files? Just here in the comments?

  4. #4
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    VBA is Visual Basic Application. Another way of saying it is that I would use a macro. I know some people have issues with macros (possibly due to the risk of viruses)

    When replying to the thread, instead of clicking on "Post Quick Reply", you should click on "Go Advanced", scroll down to "Manage Attachments" > "Add Files" > "Upload files" and you will be able to attach your files after which click on "Submit Reply".

    Regards
    Alastair

  5. #5
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    websiteexcelforum.xlsxLSexcelforum.xlsx

    So there are the two files, one is from our site, and the other is the inventory. The one from the site, that is exactly how I get it. I normally cut out all the crap I don't need. Then I align the stock number column from each spreadsheet into one column. Then I use the match duplicates option fill with red. And that will let me know what is sold, and what needs to be added. Because if there are no duplicates found on the web spreadsheet, it means that the bike is no longer in the inventory and needs to be removed. If it doesnt match duplicates on the inventory, it means that the bike is new, and it needs to be put online.

    So yea this macros option would be cool to check out. Let me know if you can help out.

    Thanks.

  6. #6
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    Sorry - I have not used a macro. If the names of the workbooks were always the same, then I could write a macro to do what I have done.

    What I have done is in the website workbook put a formula in column HD. I have used HD as being the first free column. The formula will work equally well in any other column (O,P,R for example). I then set up conditional formatting on column W to highlight bikes not in stock.

    Looking at the stock workbook in column I, I put in the following formula:
    Please Login or Register  to view this content.
    To explain:
    the "LEN(B10)>2,LEN(B10)" checks to see how long the entry is in column B (this stops "No" being placed against a heading)
    the "ISNA(MATCH(B10" means if the match fails then show "No", otherwise "Yes"

    I then put conditional formatting on column I, just to make it look pretty.

    This can be automated, but it does depend on the workbook names always being the same.

    Let me know how you get on

    Regards
    Alastair
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    I can have the workbook names always be the same, I can have the lady send me the one from the website as a continuous name, and also I can just save the inventory file as the same name each time.

  8. #8
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harlleyguy

    "websiteexcelforum" is not the catchiest name - would you like to suggest 2 names and I will incorporate that into a macro.

    Regards
    Alastair

  9. #9
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    True, but its direct. How about for the website inventory name it Webinventory and the other Hardinventory

  10. #10
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    OK, I will automate on these names.

    Regards
    Alastair

  11. #11
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    If you save the attached file in the same directory as the HardInventory and WebInventory files, when you open the Control file it should, on clicking the pretty button, open both files and compare them.

    Let me know how you get on. Feel free to ask about anything that needs explaining

    Regards
    Alastair
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Here is the debug, i just got an error run time error 438


    Edited
    Last edited by harleyguy; 07-15-2014 at 04:26 PM.

  13. #13
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Just as a reminder the lsexcelforum is hardinventory, and the website excel forum is webinventory

  14. #14
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Comparing two spreadsheets, matching duplicates question

    Your post#12 does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Edit your post#12 by highlighting your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  15. #15
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    It has been edited.

  16. #16
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    Can you let me know what the macro was trying to do when it failed?

    Regards
    Alastair

  17. #17
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    ENDRESULT.jpg Hi I attached a picture is that what the end result looks like, and what does the highlighted fields represent?

  18. #18
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi Harleyguy

    The highlighted cells are those which are on the website, but no longer in stock.

    Regards
    Alastair

  19. #19
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Man, we are so close. The original way I was doing it would give me TWO results. Results for which units are sold, and need to be removed off the site, and also which bikes are new to the inventory and need to be added to the site.

    This saves some time thanks.

  20. #20
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi Harleyguy

    erm... If you look at WebInventory, column W you will see several cells highlighted in light brown. These are those items on the web site that are no longer in stock.

    If you now look in HardInventory, column I you will note several cells with "Yes" cunningly hidden behind green highlighting. These are those items that are also on the WebInventory.

    Have I missed something here?

    Regards
    Alastair

  21. #21
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    OK so let me get this straight the green fields in the hardinventory file are the bikes that are on the website and on the inventory. Because there are fields being highlighted in green that are not on the website. For example new bikes, they aren't on the website, and there are alot of new bikes in green.

  22. #22
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    The File i have attached here is what I am going for.
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    The File i have attached here is what I am going for.

  24. #24
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    OK I see what you want. Do you want the End Result to be a separate workbook (in which case what name?) or as a sheet in HardInventory or WebInventory?

    Regards
    Alastair

  25. #25
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Hey, so sorry for not getting back sooner. It would be so helpful to have the end result in a separate work book.

  26. #26
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    I will get on to this soon. Do you have any preference for the name of the new workbook. Using all my linguistic skills, I will use "Summary" unless you suggest anything more suitable.

    Regards
    Alastair

  27. #27
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Hi, yes that would be a great name for it, summary, yes sounds good.

    Thanks again for all of your help.

  28. #28
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    Here's the Control file that will run with your WebInventory and HardInventory files. The Control file needs to be placed in the same directory as the other 2 files.

    I hope it works OK for you, but if not, then be aware that I am out of the country for 2 weeks after tomorrow and will not be able to reply to any emails.

    Regards
    Alastair
    Attached Files Attached Files

  29. #29
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Hello!

    Man, you sure are getting this down to the gnitty gritty. I see now it creates a file called summary, as to what I am assuming is an output of what should be currently on the website.

    It still involves manual work. Before you made something that was highlighting the units that were online but needed to be removed, and highlighting the units that need to be added to the website.

    This, still involves more work. Just because I still have to go on the site, and search one by one to find out what I need to remove from the site.

    Do you see what I am saying?

  30. #30
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi harleyguy

    I am currently by a pool in Greece - no access to Excel.

    I thought that the 2 files Hardinventory and Webinventory were produced with no human intervention. Is this wrong? If it is wrong, then you need to let me have the raw data and I will see what can be done.

    Regards
    Alastair

  31. #31
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Hey man that sounds awesome, and yea the spreadsheets require no human intervention. Still the summary file, is just showing me one list. I believe the summary file is just showing me what needs to be currently on the site. But it doesn't show me what needs to be removed too. So still requires me to go into the site, and cross reference it to the summary sheet. I was trying to make this program. So I just throw in the two spreadsheets, and it tells me what needs to be removed from the site, and what needs to be added to the site.

  32. #32
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    HI, just wondering if you are still in Greece

  33. #33
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    How you doing? I was wondering of you were back from Greece yet?

  34. #34
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    HI Harleyguy

    You must think that I have very long holidays (or I have given up on you!)

    Neither is right. I checked for a response to my Greek post - but did not spot that your reply was on a new page. When I was checking something else I spotted your posts. So - my apologies for the delay.

    The Summary sheet (attached) show:

    The Webinventory details, showing which needs to be Removed eg Row 8

    and the Hardinventory list showing those itemd to be Added eg Row 250

    I thought that the layout of the Summary was as per your example? So either I have got it wrong, or your Summary file is different to my Summary file.

    Please note that the Summary file has the current date added to it. This means that the macro will stop if you try to run the Summary twice on one day.

    Regards
    Alastair
    Attached Files Attached Files

  35. #35
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Yes that summary file is perfect!!!!!

  36. #36
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    I must still be doing something wrong. My summary file comes out all messed up. summary.jpg

  37. #37
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi Harleyguy

    I note that you have attached a jpg file, but I am unable to open it.

    Perhaps you will send me your messed up summary file?

    Regards
    Alastair

  38. #38
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Ok here it is
    Attached Files Attached Files

  39. #39
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Comparing two spreadsheets, matching duplicates question

    Hi Harleyguy

    Here are the 3 files that I was working on to produce the "perfect" Summary file.

    If you do not get a perfect result, please let me have back the Summary file and let me know any error messages that the system generates.

    Just to confirm: the Webinventory, Hardinventory and Control files all have to be in the same directory

    Regards
    Alastair
    Attached Files Attached Files

  40. #40
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Hi,

    Thanks again for all your help.

    So I am leaving these files in the downloads.
    Then I am opening control and pressing the button you have provided called compare.

    Now, I am seeing an error called "run-time error '1004'Method save as of object workbook failed.

    Getting so close!!

  41. #41
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Wow it just worked on a different computer.

  42. #42
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    Does it matter about the version of excel? Because it is working on one computer, and not on another.

  43. #43
    Registered User
    Join Date
    06-24-2014
    Location
    Simi Valley
    MS-Off Ver
    2007
    Posts
    25

    Re: Comparing two spreadsheets, matching duplicates question

    HI, here is the latest summary file, something regarding the sheet command, I think, in Visual Basic.
    Attached Files Attached Files

+ 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. Comparing Two Spreadsheets
    By TheoKeller in forum Excel General
    Replies: 3
    Last Post: 04-08-2014, 01:40 AM
  2. Replies: 2
    Last Post: 01-25-2012, 05:30 AM
  3. Replies: 3
    Last Post: 11-09-2011, 12:36 PM
  4. [SOLVED] Comparing two spreadsheets
    By Freddo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2006, 06:45 AM
  5. Comparing two spreadsheets
    By Morten in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-21-2005, 09:30 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