+ Reply to Thread
Results 1 to 10 of 10

Revenue allocation using combined/Nested IF statements

  1. #1
    Registered User
    Join Date
    07-16-2008
    Location
    London
    Posts
    7

    Revenue allocation using combined/Nested IF statements

    Hi,

    I have been asked to go through some information which has over 200 000 lines, what I need to do is as follows:

    where order number is unique, revenue source = "Unique"
    where order number appears more than once, check division to see if it appears in more than one division, if it does revenue source = "Cross Selling", if it does not then revenue source = "Divisional Package"

    I need all of the above in formula line which will be inserted in the revenue source column

    I have attached the file with a sample of the information I am using.

    Thanks in advance,
    Attached Files Attached Files
    Last edited by Irfan123; 07-24-2008 at 11:48 AM. Reason: The file did not attach

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    No attachment... try again.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =IF(COUNTIF($A$2:$A$434,A2)=1,"Unique",IF(SUMPRODUCT(($A$2:$A$434=A2)*($G$2:$G$434=G2))>1,"Cross Selling","Division Packaging"))

    copied down.

    Adjust ranges to suit...

    Note: Whole column references not allowed if not using XL2007

    Edited: Referenced wrong column for Divisions conditional check.
    Last edited by NBVC; 07-24-2008 at 12:05 PM.

  4. #4
    Registered User
    Join Date
    07-16-2008
    Location
    London
    Posts
    7
    Hi,

    Thanks for the quick response.

    I am using excel 2007.

    That formula is nearly there, only problem is:

    where the unique reference number appears more than once but in the same division, it should be "Divisional Packaging", at present this is coming up as "cross selling"

    Many thanks,

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Irfan123
    Hi,

    Thanks for the quick response.

    I am using excel 2007.

    That formula is nearly there, only problem is:

    where the unique reference number appears more than once but in the same division, it should be "Divisional Packaging", at present this is coming up as "cross selling"

    Many thanks,
    This seems to be opposite what you said in your original post....

    Anyways, try:

    =IF(COUNTIF($A$2:$A$434,A2)=1,"Unique",IF(SUMPRODUCT(($A$2:$A$434=A2)*($G$2:$G$434=G2))>1,"Division Packaging","Cross Selling"))

  6. #6
    Registered User
    Join Date
    07-16-2008
    Location
    London
    Posts
    7
    I probably havent explained myself properly

    where order number is unique, revenue source = "Unique"
    where order number appears more than once, check division to see if it appears in more than one division,
    if it does revenue source = "Cross Selling",
    if it does not appear in more than one division then revenue source = "Divisional Package"

    so for example, where a order number appears in Recorder and Hampstead it should be called cross selling, where an order number appears more than once, but in Recorders only then this should be called divisional package.

    Thanks for your help, much appreciated.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So does that mean my last formula solved the problem...or is there still something not right?

  8. #8
    Registered User
    Join Date
    07-16-2008
    Location
    London
    Posts
    7
    Hi, it still doesnt work, for some reason it doesnt work when there is more than one division and more than one order reference

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    This is my results...

    can you point out which are wrong.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-16-2008
    Location
    London
    Posts
    7
    Hi,

    I have highlighted some of the ones which should be showing as cross-selling as they appear in more than one division.

    Thanks for your help.
    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)

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