Reputation: 1
I am trying to write an if statement which excel returns value.
Here is the example
I wanted to sum a range of rows say A1:A25 and if the value of sum B1:b25 is less than A1:A25 return condition true, if not perform calculation.
=IF(G7:AT7>G8:AQ8,0,"-0.1*(SUM(Y14:AL14))+SUM(AO14:AQ14")
Above was my condition but the excel returns "Value"
Can any one here assist how to fix this formula?
Upvotes: 0
Views: 258
Reputation: 372
According to text it should be:
=IF(SUM(B1:B25)>SUM(A1:A25);TRUE();"other calculation")
more oversight you get by first doing sums in different cells…
[C1]=SUM(A1:A25)
[D1]=SUM(B1:B25)
[E1]=-0.1*SUM(Y14:AL14;AO14:AQ14)
[F1]=IF(D1<C1,TRUE(),E1)
after everythings works as you liek it, you can still merge, clean up and make it look nice.
Upvotes: 0
Reputation: 3675
You have several syntax errors.The formula should be:
= IF(SUM(B1:B25) < SUM(A1:A25) , true , -0.1 * (SUM(Y14:AL14) + SUM(AO14:AQ14)))
Upvotes: 1