Prev: SELECT SUM(h) WHERE e = 'eBay Payment Sent'
Next: adding figures that match 2 true and 1 false if statement cond
From: Xiamen on 24 Mar 2010 13:54 I have created this "if" statement. =IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0", IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0", IF(G17=(""),"" ))))))) Now i want to add the result of this statement from consecutive rows. i did sum on the results but i am not able to add the results of my statements. can you tell me how i can add the results of this statement?
From: Mike H on 24 Mar 2010 14:03 Try it like this =IF(G17=(166719),1, IF(G17=(165852),2, IF(G17=(165851),0, IF(G17=(166718),1, IF(G17=(166685),4, IF(G17=(166745),0, IF(G17=(""),"" ))))))) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Xiamen" wrote: > I have created this "if" statement. > =IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0", > IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0", IF(G17=(""),"" > ))))))) > > Now i want to add the result of this statement from consecutive rows. > i did sum on the results but i am not able to add the results of my > statements. > > can you tell me how i can add the results of this statement?
From: Fred Smith on 24 Mar 2010 19:40 And you don't need all the parentheses. And you should have something to say what you want if none of the tests are true. If you're happy with 0 in this case, use: =IF(G17="","",IF(OR(G17=166718,G17=166719),1,IF(G17=16582,2,IF(G17=166685,4,0)))) Regards, Fred "Mike H" <MikeH(a)discussions.microsoft.com> wrote in message news:44B7EAFA-3463-4937-9F7E-3C9EBBF8D68C(a)microsoft.com... > Try it like this > > =IF(G17=(166719),1, IF(G17=(165852),2, IF(G17=(165851),0, > IF(G17=(166718),1, IF(G17=(166685),4, IF(G17=(166745),0, IF(G17=(""),"" > ))))))) > -- > Mike > > When competing hypotheses are otherwise equal, adopt the hypothesis that > introduces the fewest assumptions while still sufficiently answering the > question. > > > "Xiamen" wrote: > >> I have created this "if" statement. >> =IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0", >> IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0", >> IF(G17=(""),"" >> ))))))) >> >> Now i want to add the result of this statement from consecutive rows. >> i did sum on the results but i am not able to add the results of my >> statements. >> >> can you tell me how i can add the results of this statement?
From: Ziggy on 25 Mar 2010 15:23
On Mar 24, 5:40 pm, "Fred Smith" <fsmit...(a)yahooo.com> wrote: > And you don't need all the parentheses. And you should have something to say > what you want if none of the tests are true. If you're happy with 0 in this > case, use: > > =IF(G17="","",IF(OR(G17=166718,G17=166719),1,IF(G17=16582,2,IF(G17=166685,4,0)))) > > Regards, > Fred > > "Mike H" <Mi...(a)discussions.microsoft.com> wrote in message > > news:44B7EAFA-3463-4937-9F7E-3C9EBBF8D68C(a)microsoft.com... > > > > > Try it like this > > > =IF(G17=(166719),1, IF(G17=(165852),2, IF(G17=(165851),0, > > IF(G17=(166718),1, IF(G17=(166685),4, IF(G17=(166745),0, IF(G17=(""),"" > > ))))))) > > -- > > Mike > > > When competing hypotheses are otherwise equal, adopt the hypothesis that > > introduces the fewest assumptions while still sufficiently answering the > > question. > > > "Xiamen" wrote: > > >> I have created this "if" statement. > >> =IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0", > >> IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0", > >> IF(G17=(""),"" > >> ))))))) > > >> Now i want to add the result of this statement from consecutive rows. > >> i did sum on the results but i am not able to add the results of my > >> statements. > > >> can you tell me how i can add the results of this statement?- Hide quoted text - > > - Show quoted text - I might consider controlling the cell with an Index/Match from a table. |