+ Reply to Thread
Results 1 to 10 of 10

Need help on returning different answers based on different results - Comparing Sales

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Need help on returning different answers based on different results - Comparing Sales

    I have found a thread that can help for the first answer but was stuck on the next answer.

    I want to compare sales for the first half year of 2011 and the first half year for 2012. After copying the data from 2 worksheets and removing duplicate rows, my first problem was:

    Unable to return "0" when no sales was found for 2011 or 2012 when I use vlookup on the summary sheet (unable to use isblank, "", gives me error on "")

    when the result returns a "#N/A" on the sales of either year, when I want to do a calculation on another column to compare the sales for the 2 years, it cannot subtract as the field with "#N/A" is not a number.

    I had attached a sample file for reference.

    I want to know from this list, what are the customers that has sales in 2011 but no sales in 2012 and no sales in 2011 but have sales in 2012.
    Attached Files Attached Files

  2. #2
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Need help on returning different answers based on different results - Comparing Sales

    Hi

    Try surrounding your formula with iferror to give a 0.

    Chris
    Click my star if I helped Thanks

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: Need help on returning different answers based on different results - Comparing Sales

    Quote Originally Posted by dogberry View Post
    Hi

    Try surrounding your formula with iferror to give a 0.

    Chris
    Dear Chris,

    Thanks, this helps in my column C and D, but not not in E. Hoped someone can help on the returning result on column E. Else, the negative sign could means a decrease in sales but not losing a customer and the increase in sales in 2012 does not means a new customer added in 2012.

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Need help on returning different answers based on different results - Comparing Sales

    Hi ec4excel
    Try in E3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See attached

  5. #5
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: Need help on returning different answers based on different results - Comparing Sales

    Dear Kevin,

    Thank you very much for your help, it works! But I have a problem here. If you uses this method "New Sales of $"&TEXT(G11,"0,000.00", if the sales goes below thousand will look very funny. And when both don't have sales in the first 6 months, it will still return as "New Sales of $0,000.00".

    Are you able to further help in the formula?

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Need help on returning different answers based on different results - Comparing Sales

    Hi

    It returns the values as text, as you require the cell to contain New sales etc. If you can do away with that it will be a lot easier. Maybe have the text part in a column next to the number!

  7. #7
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: Need help on returning different answers based on different results - Comparing Sales

    Dear Kevin,

    Thanks for the reply. I had changed this "New Sales of $"&TEXT(G11,"0,000.00" to "New Sales of $"&TEXT(G11,D11-C11)

    and also, return a 0 when no sales.

  8. #8
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: Need help on returning different answers based on different results - Comparing Sales

    Dear Kevin,

    Thanks for the reply. I had changed this "New Sales of $"&TEXT(G11,"0,000.00" to "New Sales of $"&TEXT(G11,D11-C11)

    and also, return a 0 when no sales in column C and D.

  9. #9
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Need help on returning different answers based on different results - Comparing Sales

    Hi ec4excel

    Thank you for the feed back.

  10. #10
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Need help on returning different answers based on different results - Comparing Sales

    Hi

    Likewise thank you for the feedback.

    Chris

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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