Forum Discussion
DennisMetro
Jun 24, 2021Brass Contributor
EXCEL IF FUNCTION
Hi, So, for example, =IF((H2="")*(J2=""),"",IF(H2>J2,"overload","apples")) this basically says if H2 or J2 are empty then return an empty string but if H2 is greater than J2 then return "overload" ...
- Jun 24, 2021
Enter the values you want to return in cells, e.g in Y1 and Z1. You can then use
=IF(H2&J2="","",IF(H2>J2,$Y$1,$Z$1))
HansVogelaar
Jun 24, 2021MVP
Enter the values you want to return in cells, e.g in Y1 and Z1. You can then use
=IF(H2&J2="","",IF(H2>J2,$Y$1,$Z$1))
- DennisMetroJun 24, 2021Brass ContributorHi Hans, Thanks. The problem is I don't know the values of Y1 and Z1. There is a range of possible values. When I know the values for Y1 and Z1 I could just put them directly into the "______" part of the code. Hence my "whatever the value of this string is".
- HansVogelaarJun 24, 2021MVP
I don;t understand. What do you mean by "whatever the value of this string is"? What is "this string"?
- DennisMetroJun 24, 2021Brass ContributorSorry! I've just now realized that your original solution works! My apologies. One question, if I may. As an old school type merchant - is there a good reference book for this sort of guidance? Years ago I liked to sit at the computer but look up stuff in a manual! I know it's all online these days but sometimes I just get it faster when I'm reading it on paper rather than 2 tabs open! I think it has to do with my age. Thanks again for your help.