function or conditional
function or conditional
(OP)
I am trying to accomplish something that seems simple in a spreadsheet but I am having the most difficult time returning good result.
Here is my goal
Column E contains a value representing Hours
Column F contains a YES or No representing preventive maintenance or not.
I want to get column H to list the hours if F from same row is Yes.
I want to get column I to list the hours if F from same row is No.
I have tried IF, Lookup, Hlookup....
I could get the no to work ok but I cannot get the yes to work, it displays a value no matter what I try.
Here is what almost works - [in h10]- LOOKUP("no",F10,E10)
But if I change "no" to "yes" it always gives a value.
Here is my goal
Column E contains a value representing Hours
Column F contains a YES or No representing preventive maintenance or not.
I want to get column H to list the hours if F from same row is Yes.
I want to get column I to list the hours if F from same row is No.
I have tried IF, Lookup, Hlookup....
I could get the no to work ok but I cannot get the yes to work, it displays a value no matter what I try.
Here is what almost works - [in h10]- LOOKUP("no",F10,E10)
But if I change "no" to "yes" it always gives a value.
Fill what's empty. Empty what's full. And scratch where it itches.





RE: function or conditional
Fill what's empty. Empty what's full. And scratch where it itches.
RE: function or conditional
H6 =if(F6="Yes",E6,0)
I6 =if(F6="No",E6,0)
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: function or conditional
Fill what's empty. Empty what's full. And scratch where it itches.