IF, THEN SYNTAX

  • Thread starter Thread starter BBABBZZ
  • Start date Start date
B

BBABBZZ

HELP!!!

=IF(AB2, C1 THEN B2)

C1 IS A DATE....IF AB2 IS GREATER THAN OR EQUAL TO THAT DATE THEN INSERT
AMOUNT IN B2, IF NOT ENTER "0"
 
Cell C 1 is formatted as a date.

Cell AB2 is formatted as a date.

The formula in AB6 is:

=IF(OR(AB2>C1,AB2=C1),B2,"0")

I think that the above gives you what you want.

If my comments have helped please hit Yes.

Thanks.
 
BBABBZZ said:
C1 IS A DATE....IF AB2 IS GREATER THAN OR EQUAL TO THAT
DATE THEN INSERT AMOUNT IN B2, IF NOT ENTER "0"

Well, the "obvious" answer is:

=IF(AB2>=C1, B2, 0)

But whenever I see a posting in all caps and a reference to "0" [sic]
instead of 0 (without quotes), especially when it is posted using the MS
Discussion Groups web interface, I suspect that things are not as "obvious"
as they might seem.

When you say that C1 (and AB2, presumably) are "dates", do you mean a number
formatted as Date or a Custom date format (the "obvious" assumption), or do
you mean text that looks like (or you interpret as) a date in some form?

If the latter -- which you can determine by entering =TYPE(C1) and
=TYPE(AB2) somewhere and interpreting according to the help page for TYPE --
then the "obvious" solution probably will work. (Although it might __seem__
to work with some examples.)

If the "obvious" answer does not work, be sure to tell more about these
"dates".

PS: If B2 is text and really do want the text "0" as the alternative,
enter:

=IF(AB2>=C1, B2, "0")

But do not use "0" if B2 is numeric. It is better to return the number zero
alternatively.


----- original message -----
 
Back
Top