I have seen several people submit solutions to problems that include formulas like, for example, Please Login or Register to view this content. The syntax is not wrong, but since an IF statement is looking for a TRUE or FALSE, I entered the following, and it works just fine... Please Login or Register to view this content. I found that it works in macros, too. I used the following this week, and it works exactly as I expected... Please Login or Register to view this content. This one works great, too: Please Login or Register to view this content.
Please Login or Register to view this content.
Even simpler still: Please Login or Register to view this content.
Originally Posted by HankW501 The syntax is not wrong, but since an IF statement is looking for a TRUE or FALSE, I entered the following, and it works just fine... =IF($Y$32, 1, 0) Yes, it will work on numbers and Boolean values. Any number other than 0 evaluates to TRUE and 0 evaluates to FALSE. A text value will generate the #VALUE! error: =IF("x",1,0) = #VALUE!
Biff Microsoft MVP Excel Keep It Simple Stupid Let's Go Pens. We Want The Cup.
=--$Y$32 What does that do?
Originally Posted by HankW501 What does that do? Ha, I believe that falls into the category of "did you try it and see what it does"? The -- is called a double unary and in this instance it coerces a 1 or 0 from TRUE or FALSE.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Forum Rules
Bookmarks