Results 1 to 6 of 6

Thread: sumif

  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Column A, rows 1-10 contain text. Column B, rows 1-10 contain data (numbers). What I would like to do is enter a formula in each of the cells in column C, rows 1-10, that would insert the data that is in the respective cell in Column B in the respective cell in Column C, but only if in the same row in Column A the word "Red" is in the text. Any ideas?
    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Why would you use SUMIF for that?
    Enter this formula in C1:

    =IF(A1="Red",B1,"")

    and fill down to C10.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by HansV View Post
    Why would you use SUMIF for that?
    Enter this formula in C1:

    =IF(A1="Red",B1,"")

    and fill down to C10.
    Not quite, for you see the "Text" in the cells in Column A may, and in many instances, does, contain other words as well as "Red". I tried using a wildcard format such as If(A1="*Red*",B1,""), but it didn't work either-it returns a zero for all of the rows despite the fact that several of the cells in Column A contained text that included "Red".

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try

    =IF(ISERROR(SEARCH("Red",A1)),"",B1)

    This is not case-sensitive. If you want it to be case-sensitive, use

    =IF(ISERROR(FIND("Red",A1)),"",B1)


  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks Hans, sorry I wasn't more clear in my initial request.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    No problem!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •