Formula Help Needed
"David Biddulph" <groups [at] biddulph.org.uk wrote...
You could probably shorten and simplify
....
=IF(AND(OR(E4="Pipe",E4="Riser"),H4<""),"m",
IF(AND(E4<"Pipe",E4<"Riser",E4<"",H4=1),"no. ",
IF(AND(E4<"Pipe",E4<"Riser",E4<"",H4<"",H41) ,"nos.","")))
and could shorten it further.
....
Indeed. There are many conditions that seem to head to "" return
value. It's arguably clearer to show all of them explicitly. The real
trick to simplification is handling E4 properly, which means testing
it as FEW times as possible.
=IF(E4="","",IF(OR(E4="Pipe",E4="Riser"),IF(H4<"" ,"m",""),
IF(H4=1,"no.",IF(N(H4)1,"nos.",""))))
|