I got the formula for: if A1>=0 and B1 <=0 then set C1 to "Not Good".

Instead of not good, I want it to search A1 and B1 for the highest value and if the highest value is in A1 then put that value in C1, if the highest value is in B1 set C1 to 0IF(AND(A1>=0,B1<=0),_______________________________

Thanks

Once again, I have to ask: What happens if A1 and B1 both equal zero?

Since there will be no "highest value" in that case, what do you want in C1?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

if it equals 0 then set C1 to "Not Good"

If itequals zero?Which

it? Your question involves 2 cells A1 and B1, so sayingitis not clear enough for us.You need to learn to ask your questions more clearly. Since there is a major difference between IF(A1>0,... and IF(A1>=0,... you need to be specific or we're apt to offer a solution that won't fit your needs.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

If A1 and B1 = 0 then set C1 to "Not Good"

What happens if A1 and B1 equal each other, but they don't equal 0? e.g. the condition where A1 = 1 and B1 = 1 is not covered in your reqiurements.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

if A1 and B1 = 1 is it possible to set C1 to "Not Good"

=IF(A1=B1, "Not Good", IF(A1>B1, A1, 0))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Thanks, I really appreciate you helping me. How about the first part of the question,

where I want a search done on A1 and B1 for the highest value and if the highest value is in A1 then put that value in C1, if the highest value is in B1 set C1 to 0.Thanks

Did you test my latest suggestion? As far as I can tell you have asked for a formula to deal with 3 conditions:

If A1 is greater than B1, C1 = A1

If B1 is greater than A1, C1 = 0

If A1 equal B1, C1 = Not GoodMy lastest suggestion handles all 3 of those conditions.

=IF(A1=B1, "Not Good", IF(A1>B1, A1, 0))

May I suggest that you spend some time reading the Excel Help files on the IF function. Google can also provide a lot of help and examples on all Excel functions.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Thank you very much. You were right. The answer that you provided was correct. I was trying to use the MAX function to solve the problem.

Well, there's no need to use the MAX function, but you could... =IF(A1=B1, "Not Good", IF(MAX(A1:B1)=A1, A1, 0))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Ask Your Question

Weekly Poll

Do you think ride and car sharing are the future of transportation?

Discuss in The Lounge

Poll History