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
323
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,078,504
Messages
5,340,777
Members
399,395
Latest member
KJAC

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top