Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

function or conditional

Status
Not open for further replies.

aamoroso

Mechanical
Mar 5, 2003
432
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.


Fill what's empty. Empty what's full. And scratch where it itches.
 
Replies continue below

Recommended for you

Sorry my title is misleading, I was going to ask should I try conditional or is there a function that works better for what I am trying to do?

Fill what's empty. Empty what's full. And scratch where it itches.
 
Easiest is to use if

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.
 
Figures I was over complicating it. Thanks Greg I appreciate it.

Fill what's empty. Empty what's full. And scratch where it itches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor