# Thread: If Function?? (Excel XP)

1. ## If Function?? (Excel XP)

I started a formula in cell D70. I'm trying to pull the total found in column D into cell D70, if there is a "1" (for District 1) in column C.

It would take forever to do this this way, and wouldn't adjust for new rows added in the top section. Is there any way to create a formula that would look in all of column C (C5:C67) for District 1, and add together the value found in the adjacent cell in column D? Also, would the formula expand as new rows were added within rows 5 through 67?

2. ## Re: If Function?? (Excel XP)

Such a formula is automatically adjusted if rows are inserted or deleted within the range.

To add all values in D365 for which C3:C65 contains '1', use SUMIF:

=SUMIF(\$C\$3:\$C\$65,"1",\$D\$3:\$D\$65)

The first argument is the range to check, the second argument is the condition, and the third argument is the range to sum.

3. ## Re: If Function?? (Excel XP)

<pre>=SUMIF(C5:C67,1,D567)</pre>

Steve

#### Posting Permissions

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