Nested IF statement to compare values in 3 columns
Hi Experts
Would like to implement using IF statement or VBA
If there is value is zero for 2009, 2010,2011 then not used in "3yrs"
if any of them is true would like years' in which used .
IF used in all three years then "High Usage"
here is the formula for row two.
=IF(SUM(C2:E2)>0,IF(C2*D2*E2>0,"High Usage","USED "&IF(C2>0,$C$1,"")& " " &IF(D2>0,$D$1,"")& " " &IF(E2>0,$E$1,"")),"No Usage 3yrs")
I realise this question is closed, but for the record:
Both
IF(AND(C2<>0,D2<>0,E2<>0)
and
IF(C2*D2*E2>0
can also be expressed with
IF(Countif(C2:E2,">0")
The benefit is speed. It's only one operation as opposed to three comparisons or two multiplications.
cheers, teylyn
Microsoft Excel
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
=IF(SUM(C2:E2)>0,IF(C2*D2*