+ Reply to Thread
Results 1 to 7 of 7

Lookup and Sum Combination

Hybrid View

seansmithMMA Lookup and Sum Combination 10-23-2015, 10:37 AM
mcmahobt Re: Lookup and Sum Combination 10-23-2015, 11:28 AM
seansmithMMA Re: Lookup and Sum Combination 10-23-2015, 12:27 PM
TMS Re: Lookup and Sum Combination 10-23-2015, 11:29 AM
seansmithMMA Re: Lookup and Sum Combination 10-23-2015, 12:32 PM
seansmithMMA Re: Lookup and Sum Combination 10-23-2015, 01:02 PM
TMS Re: Lookup and Sum Combination 10-23-2015, 01:42 PM
  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Lookup and Sum Combination

    Hello,

    I've been trying to figure out how to write this formula for a while now and finally decided I need some help. Here is a very dumbed-down version of the data I'm using and the steps of what I'm trying to accomplish. Any help would be greatly appreciated.

    Fruit State Cost Test 1 Test 2
    Apple FL 1.00 True True
    Orange FL 2.00 False True
    Banana CA 2.50 True False
    Apple PA 1.25 False False
    Apple FL 1.10 True False

    1. I need to lookup values in the cost column based on values in both the Fruit and State columns. (All Apples from FL for example)
    2. I need to sum all the values returned from step 1.
    3. IF step 2 does not return a certain value, I need to determine if Test 1 and Test 2 are both True/False or one is True and one is False.

    I need to keep all of this logic in one cell if possible rather than pulling the lookup values from step 1 into a new array and summing from there.

    Not sure if that is clear or not, so please let me know if clarification is needed. Thanks!
    Last edited by seansmithMMA; 10-23-2015 at 12:37 PM.

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Lookup and Sum Combination

    Quote Originally Posted by seansmithMMA View Post
    3. IF step 2 does not return a certain value, I need to determine if Test 1 and Test 2 are both True/False or one is True and one is False.
    What is this "certain value"?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Registered User
    Join Date
    12-19-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Lookup and Sum Combination

    "What is this "certain value"?"

    The certain value is 0, but I guess my example doesn't really work for that. There would be be several positive and negative numbers in the cost column.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,429

    Re: Lookup and Sum Combination

    You can use SUMIFS to total Apples in FL. I don't understand Step 3. How do you plan to check the True/False Combination?


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    12-19-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Lookup and Sum Combination

    Quote Originally Posted by TMS View Post
    You can use SUMIFS to total Apples in FL. I don't understand Step 3. How do you plan to check the True/False Combination?


    Regards, TMS
    Don't think I've tried SUMIFS. I'll take a look at that. Thanks.

    For 3, I would do something like:

    IF return of 2 =/= 0, then IF(OR(AND(Test1="True",Test2="True"),AND(Test1="False",Test2="False"),x,y)

  6. #6
    Registered User
    Join Date
    12-19-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Lookup and Sum Combination

    Quote Originally Posted by seansmithMMA View Post
    Don't think I've tried SUMIFS. I'll take a look at that. Thanks.

    For 3, I would do something like:

    IF return of 2 =/= 0, then IF(OR(AND(Test1="True",Test2="True"),AND(Test1="False",Test2="False"),x,y)
    OK, the SUMIFS got my wheels turning again at least. I'll mark this as solved for now and come back if I hit another snag. Thanks for the help!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,429

    Re: Lookup and Sum Combination

    You're welcome.

+ 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. Lookup and transpose combination problem??????
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2013, 05:45 AM
  2. Lookup, match or combination
    By kryt0n in forum Excel General
    Replies: 7
    Last Post: 09-06-2012, 11:41 AM
  3. Combination lookup and average
    By alepenn in forum Excel General
    Replies: 13
    Last Post: 07-06-2010, 05:19 PM
  4. Lookup and Countif combination
    By blackhawk in forum Excel General
    Replies: 6
    Last Post: 05-11-2009, 04:53 PM
  5. is this an index or combination with lookup
    By mheinmiller in forum Excel General
    Replies: 1
    Last Post: 12-16-2008, 04:20 PM
  6. multiple array reference with lookup combination
    By wolph42 in forum Excel General
    Replies: 3
    Last Post: 07-22-2008, 07:46 AM
  7. Combination Lookup - Match - Index
    By idrisb59 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-19-2008, 12:25 PM
  8. Replies: 4
    Last Post: 03-31-2008, 12:28 PM

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