Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date formula inconsistency 1

Status
Not open for further replies.

mtdew

Technical User
Dec 9, 2007
77
US
I have data imported from a text file to Excel. I then have created a formula in a column. I realize this may not be the correct way to determine the time frame but it seems to work everywhere but one cell and I don't see why I get the term FALSE instead of a 1 or 0. This is the formula for column one labeled prior 7-12 months:

=IF(NOW()-B2<365,IF(NOW()-B2>181,1,0))

The formula for the column labeled 4-6 months:

=IF(NOW()-B2<180,IF(NOW()-B2>91,1,0))

and the formula for the last column labeled current-3 months:

=IF(NOW()-B2<91,1,0)

The idea is in column B2 I have the sold date for my data. I need to know how many sales occurred for the different time periods. I have tried formatting the columns with the formulas as GENERAL and as NUMBER. I have also tried formatting the date column as GENERAL and as DATE (Mar-01) but I still have the one cell that gives me the formula result as FALSE. The corresponding B2 column for that one reads as Feb-08 or 39502 according to how it is formatted.

I bet it's something very simple, right?
 
hi,

[tt]
=IF(NOW()-B2<365,IF(NOW()-B2>181,1,0)[red],???[/red])
[/tt]
If your formula is returning FALSE, it is because,

1) NOW()-B2 is >= 365
2) the FALSE argument from the FIRST IF is MISSING.

"The corresponding B2 column for that one reads as Feb-08 or 39502" GOOD! you checked the format (general & date). Just be sure that the ACTUAL date is 2/1/2008, the FIRST of the month. faq68-5827

I would use TODAY() rather than NOW() in this instance.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top