Eliminate FALSE

D

dzelnio

=IF(AND(V2="monthly",Y2="January"),$U2)

works great when statements are true. How do I say "if false then
leave the cell alone?"
 
J

JE McGimpsey

dzelnio said:
=IF(AND(V2="monthly",Y2="January"),$U2)

works great when statements are true. How do I say "if false then
leave the cell alone?"

You can't "leave the cell alone" - a formula *always* returns a result
to the cell. You can return a null string:

=IF(AND(V2="monthly",Y2="January"),$U2,"")

but the result is a text string.

If you're just displaying the result, that's probably fine - it looks
blank. Some functions (e.g., SUM()) ignore text. But it may cause an
error if you try, for example, to use it in a math formula:

A1: =IF(FALSE,"Not false","")
A2: =A1+B1 ==> #VALUE! error

(where FALSE would be coerced to 0, so A2 would return the value in B1).

You could instead use conditional formatting to hide FALSE returns by
changing the font color to the same as the cell color.
 
C

CyberTaz

One way:

=IF(AND(V2="monthly",Y2="January"),$U2,)

which returns a value of 0, or:

=IF(AND(V2="monthly",Y2="January"),$U2,"")

Which renders nothing displayed in the cell.
 
D

dzelnio

Thanks for your help. What I'm trying to do is have one column
represent frequency the other would have start month. Those would
then autofill in all of my month columns

So, if under the frequency column I type in "monthly"
And in the start date column I type in "January"
The result would be a entry in each month.

If frequency = "Bi-monthly"
And Start Date = Febuary
The result would plug information into Feb, Apr, Jun, Aug, Oct, Dec

If frequency = "Quarterly"
And State Date = March
The result would plug info into Mar, Jun, Sept, Dec

Considering the formula you have helped me with so far, is this
possible? I got to thinking that a cel under January would have to
include a really long formula to look for all of the combinations of
schedules. Hmmm...
 
B

Bob Greenblatt

Thanks for your help. What I'm trying to do is have one column
represent frequency the other would have start month. Those would
then autofill in all of my month columns

So, if under the frequency column I type in "monthly"
And in the start date column I type in "January"
The result would be a entry in each month.

If frequency = "Bi-monthly"
And Start Date = Febuary
The result would plug information into Feb, Apr, Jun, Aug, Oct, Dec

If frequency = "Quarterly"
And State Date = March
The result would plug info into Mar, Jun, Sept, Dec

Considering the formula you have helped me with so far, is this
possible? I got to thinking that a cel under January would have to
include a really long formula to look for all of the combinations of
schedules. Hmmm...
Yes, you are correct! Not only January, but the cell for each month would
have to allow for monthly, quarterly, bi-monthly, etc. I would recommend
using some intermediate columns that would later be hidden.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top