Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
SOLVED

Formula

Copper Contributor

A need a little help writing a formula.  

 

My question is 

 

IF(A1>0.00 then I don't want it to add cells A2:A5)   If(A1=0.00 I want it to add cells A1:A5)

 

Thanks for your help.

 

GV

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@GVtequila62,

Enter the following formula in the cell where you want to see the sum

 

 

 

=IF(A1>0,"",SUM(A2:A5))

 

 

 

Since you only want to add A1:A5 when A1=0, then there is no point in including the value of A1 in the sum (because it will only add zero to the sum) - hence the range you want to add is in fact A2:A5

You haven't specified what you want to do if A1<0 - in the formula above, if A1<0 only A2:A5 gets summed.

 

@RedNectar 

 

Thank you for your help.  The formula worked perfect. Cheers!

 

 

 

1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@GVtequila62,

Enter the following formula in the cell where you want to see the sum

 

 

 

=IF(A1>0,"",SUM(A2:A5))

 

 

 

Since you only want to add A1:A5 when A1=0, then there is no point in including the value of A1 in the sum (because it will only add zero to the sum) - hence the range you want to add is in fact A2:A5

You haven't specified what you want to do if A1<0 - in the formula above, if A1<0 only A2:A5 gets summed.

 

View solution in original post