+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : How to- If statement resulting in value in cell summed in another cell

  1. #1
    Registered User
    Join Date
    02-10-2010
    Location
    OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to- If statement resulting in value in cell summed in another cell

    I'm not even sure how to ask the question

    I have a list of parts that are sorted by part #. Within this list there are different alloys of parts (8 alloys total Alloy column E2:E150).

    One column is updated by me on a daily basis and this changes the amount of lbs left to make for the month (which shows in cell S2:S150).

    I want to create a statement that performs:

    IF "Alloy" in E2 equals 6-2-4-2, put value in S2 into cell V5. I want all of the 6-2-4-2 values to total in cell V5.
    AND IF "Alloy" in E2 equals BC, total values in S2:S150 into cell V6
    AND IF "Alloy" in E2 equals 6-4 DM, total values in S2:S150 into cell V7
    AND IF "Alloy" in E2 equals 6-4 PWA, total values in S2:S150 into cell V8

    Any help would be greatly appreciated!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to- If statement resulting in value in cell summed in another cell

    Aren't these just 4 different formulas?

    V5: =IF(OR(E2="", E2<>"6-2-4-2"), "", SUM($S$2:$S$150))
    V6: =IF(OR(E2="", E2<>"BC"), "", SUM($S$2:$S$150))
    V7: =IF(OR(E2="", E2<>"6-4 DM"), "", SUM($S$2:$S$150))
    V8: =IF(OR(E2="", E2<>"6-4 PWA"), "", SUM($S$2:$S$150))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-10-2010
    Location
    OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to- If statement resulting in value in cell summed in another cell

    The formula would be in S2-S150. I need all that to go in one formula and spit the results out into V5,V6,V7,V8.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to- If statement resulting in value in cell summed in another cell

    That's not how worksheet formulas work. If you want different results in those cells, each would need its own formula. According to your OP, I believe the formulas I gave do that.

  5. #5
    Registered User
    Join Date
    02-10-2010
    Location
    OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to- If statement resulting in value in cell summed in another cell

    OK, I see what you are saying. I paste the formula and the cell is blank. Am I supposed to fill in those empty quotes?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to- If statement resulting in value in cell summed in another cell

    If the formula results in null values, then that column is supposed to be blank. Only the formula that gets a match to the text string in E2 will get a SUM() for it's cell. All the others should be blank.

    Properly inserted, only one of the 4 cells will give an answer, or none if E2 fails to match any of them.

    Post up a sample worksheet showing examples of all the matched values, if you keep having difficulty.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.

+ 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