+ Reply to Thread
Results 1 to 5 of 5

Customer Sales Comparison

  1. #1
    Registered User
    Join Date
    03-26-2008
    Posts
    18

    Customer Sales Comparison

    I apologize if this is a similar post

    I have exported from from my Accounting Program into Excel a list of customers and their sales from Sept. 2009 into one worksheet and customers and their sales from Sept. 2010 into another.

    I have included the spreadsheet for your review.

    Can anyone help me with either a macro or formula or function that can take information from both sheets and in the third worksheet create a comparison in the following format (columns)?

    Customer Name | Last Year Sales | This Year Sales | Difference | Percent Change

    The trick is..... the customer list may be different from one period to the other, but they need to be included if they had activity or not in either year.

    Thank you in advance, I have been racking my brain for weeks around this issue. Sure I can do it manually but it would take me at least 30min to an hour to sort and organize it.

    Gracias!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Customer Sales Comparison

    Here's what I did: read this description and then open the example I've posted and let me know if it works for you.

    First, I copied the names from column A on the two sheets into column A on the "Sheet2". I highlighted the whole range, then clicked remove duplicates on the Data tab. This got the list of names to one for each name on either the 09-2009 sheet or 09-2010 tab. Next I sorted this list to be alphabetic. I used vlookups copied down the columns to fill Last Year Sales and This Year Sales. I used a simple subtraction formula to fill the difference, and a simple division formula to get the Percent Change. Then I used a conditional format to color the cells with errors with white text. This is because the vlookup cells give an error if no value is found (if a company is not listed on one of the two sheets). You can't compare the difference if a value is missing, and the percentage change is meaningless as well.

    In all, it took about 3 minutes. If you want it could be automated with VBA, but it almost doesn't seem worth the trouble...
    Attached Files Attached Files
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    03-26-2008
    Posts
    18

    Re: Customer Sales Comparison

    Holy cow!!!! You are the man! This is so helpful. Now I need to learn how to apply the VLOOKUPS. I have studied it and it makes sense.

    I am going to try one on my own but I think I will need some help in executing correctly the VLOOKUPS.

    Excellent work, I am so happy!!!

  4. #4
    Registered User
    Join Date
    03-26-2008
    Posts
    18

    Re: Customer Sales Comparison

    Mr. Davegugg,

    Thank you very much for your help. The VLOOKUP has been valuable. I have another question.

    How do I word the formula that if there is a N/A that the value be ZERO?

  5. #5
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Customer Sales Comparison

    The only way that I know of is with an IF() with IsError().
    In general: IF(IsError(VLookup()),0,Vlookup())

    Here is a specific example from cell B5 of the workbook I posted:

    Please Login or Register  to view this content.
    Let me know if you need more

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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