+ Reply to Thread
Results 1 to 11 of 11

IF Formula

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    IF Formula

    I hope I can explain myself well. I have tried several but I it didn't work I hope you can help me.

    I have three columns, A, B, C. What I do is a formula in excel that I look in column A all the same type of data (samedata) and column B grab all who are of the same data (samedata1) and sum all the values of that condition from the colum C

    If column A = "samedata" AND column B = "samedata2"
    SUM the Values on Column C

    Thanks For the help

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Formula

    for 2003
    =SUMPRODUCT(--($A$2:$A$500="samedata"), --($B$2:$B$500="samedata2"), $C$2:$C$500)
    adjust ranges as needed (all must be the same length)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: IF Formula

    Since you are using Excel 2003, try this array formula... =SUM((A:A="samedata")*(B:B="samedata2")*C:C)

    Make sure to use array enter (CTRL-SHIFT-ENTER) instead of just enter...

    Let me know if this works for you...

    Dennis

  4. #4
    Registered User
    Join Date
    06-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: IF Formula

    I am sorry would you mind explain me the formula that you give me.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Formula


  6. #6
    Registered User
    Join Date
    06-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: IF Formula

    Thank You, however is not working.

    This is my formula: The information is in another sheet (I don't think this should be a problem right?)
    In my column B I need the information to be UA and in my column D meeting room and if both conditions are true grab all the values of J and sum it to have a total

    =SUMPRODUCT(--('CB DB'!$B$2:$B$500="UA"), --('CB DB'!$D$2:$D$500="meeting room"), $J$2:$J$500)

  7. #7
    Registered User
    Join Date
    06-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: IF Formula

    I appreciate all your help

  8. #8
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: IF Formula

    shinju,

    Your formula looks fine... can you attach a sample spreadsheet so that we can see where things are breaking down... Go Advanced, Manage Attachments...

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Formula

    I agree with djapigo. Some things that might cause issues, hidden spaces. you might have " UA" or "meeting room " numbers might be stored as text. Best bet is to submit a sample of your workbook so we can troubleshoot.

  10. #10
    Registered User
    Join Date
    06-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: IF Formula

    Quote Originally Posted by ChemistB View Post
    I agree with djapigo. Some things that might cause issues, hidden spaces. you might have " UA" or "meeting room " numbers might be stored as text. Best bet is to submit a sample of your workbook so we can troubleshoot.

    I have attached a test document, I hope you can help me
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Formula

    This formula in Totals!B14 can be copied down and across

    =SUMPRODUCT(--(INFORMATION!$B$6:$B$23=B$13), --(INFORMATION!$C$6:$C$23=$A14), INFORMATION!$G$6:$G$23)
    You were not referring to Information with the last argument (and were referring to J instead of G) and had a different number of rows. The way this is set up, each argument must have the same number of rows. I also replaced the hard values of UA and Meeting rooms with cell references. Questions?

+ 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