IF

Stylus88

New Member
Joined
Oct 31, 2019
Messages
5
I've discovered this thread from a little time, so if it's possible i post another doubt.

I have this formula (really is longer but if a part is correct i suppose that all can be correct as well)

=IF(D15<>0,5 +IF(E15<>0,5 +IF(F15>0,5)))

I wanna have a total that give me a value if any,one,or some of this conditions are confirmed, but in the way that is written it works just if the cell before support the conditions: so it give me 15 If D15 is >0 and E15>5 and F15>5 but it doesn't give me 10 if D15 is 0 and E15>0 and F15>0 or D15>0 E15 is 0 and F15>0
 

Eric Golf

Active Member
Joined
Dec 19, 2007
Messages
322
Hi,

Separate the Ifs then add them together e.g.

=IF(D15<>0,5,0)+IF(E15<>0,5,0)+IF(F15>0,5,0)

I am sure someone could / will come up with an easier way, such as COUNTIF, but this should get you started.

Hope this helps,

Eric
 
Last edited:

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
3,745
Please review the following to see if one or more of the alternatives addresses your question.


<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: right;color: #333333;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td></tr></tbody></table><p style="width:1.2em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">6c</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B2</th><td style="text-align:left">=IF(<font color="Blue">D15<>0,5,0</font>)+IF(<font color="Blue">E15<>0,5,0</font>)+IF(<font color="Blue">F15>0,5,0</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C2</th><td style="text-align:left">=COUNTIF(<font color="Blue">D15:E15,"<>"&0</font>)*5</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">D2</th><td style="text-align:left">=(<font color="Blue">D15<>0</font>)*5+(<font color="Blue">E15<>0</font>)*5+(<font color="Blue">F15>0</font>)*5</td></tr></tbody></table></td></tr></table><br />
 

Stylus88

New Member
Joined
Oct 31, 2019
Messages
5
Thank you! I realized to have forgotten the brackets in the first formula and now it works! Interesting the second one too, I didn't know it.
So kind as always!
 

Forum statistics

Threads
1,077,649
Messages
5,335,473
Members
399,017
Latest member
npatel917

Some videos you may like

This Week's Hot Topics

Top