+ Reply to Thread
Results 1 to 2 of 2

Compound if statement

  1. #1
    Registered User
    Join Date
    11-02-2010
    Location
    NYBW
    MS-Off Ver
    Excel 2007
    Posts
    4

    Compound if statement

    I would like to write the following if statement
    =IF(B1=D1,C1,0)+IF(B1=D2,C2,0)+IF(B1=D3,C3,0)+...

    Essentially I want to match a text value in column D with the first one in column B and record the associated value of C. I need to do this for over a thousand values in column B.

    I am not too familiar with these formulas or codes but essentially what I would like to do is use the statement =IF(B$1=D1,C1,0) and sum it for the entire column. I would then like to record that sum and put it in the same place as the original, say G1.

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

    Re: Compound if statement

    try something like

    =SUMIF(D:D,B1,C:C)

    copied down

    Adjust ranges to suit.
    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.

+ 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