Excel - if then statements

Closed
Straderade - Jan 24, 2010 at 03:15 AM
 Trowa - Jan 25, 2010 at 08:41 AM
Hello,

I have 8 columns total and want to create a if then statement for the sum of column D IF in column A contain a + for that row.

Almost like a balance check book - if the row contains the + sign then add it up with all the others with that sign and create a sum of all those while ignoring the rows with a - sign.

Thanks!
Related:

1 response

Hi Straderade,

If you want to add up a column of numbers depending an a value in another column it's wise to use an array formula.

I randomly put "+" and "-" in range A1:A20, then I put random numbers in range D1:D20.
To add up the numbers in column D only if range A1:A20 shows a "+" for that row, use the following formula:

=SUM((A1:A21="+")*(D1:D21))
This is an array formula and needs to be confirmed by hitting Ctrl+Shift+Enter.

Does this solve your query?

Best regards,
Trowa
0