»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 08-26-2003, 09:33 PM   #1 (permalink)
Registered User
 
PeterGriffin's Avatar
 
Join Date: Nov 2002
Posts: 339
PeterGriffin is on a distinguished road
Help with MS Excel

I need a function!

In cell A1 I have a date.
In cell B1 I want it to analize the data in A1 and output a "1" if the date is between 01/01/03 and 02/01/03 otherwise if false write "0".

How would I write this formula?


The formulas I see all only allow you to do one logical test. In this case I'm wanting to do two logical tests, aren't I?


PLEASE HELP

PeterGriffin is offline   Reply With Quote
Old 08-26-2003, 10:07 PM   #2 (permalink)
Registered User
 
BitSpit's Avatar
 
Join Date: Mar 2003
Location: Glasgow, KY
Posts: 150
BitSpit is on a distinguished road
Send a message via ICQ to BitSpit Send a message via Yahoo to BitSpit
This formula should do it. The key to making it work is to format your date cell as text. If you don't, it returns the VALUE error.

=IF(DATEVALUE(A1)>=DATEVALUE("01/01/03"),IF(DATEVALUE(A1)<=DATEVALUE("02/01/03"),1,0),0)
BitSpit is offline   Reply With Quote
Old 08-27-2003, 02:24 PM   #3 (permalink)
Registered User
 
PeterGriffin's Avatar
 
Join Date: Nov 2002
Posts: 339
PeterGriffin is on a distinguished road
That works great buuuutttt.
When I format my already "date formated" cells into "text format" the numbers go all crazy.

How can I maintain my dates when I format to text?
PeterGriffin is offline   Reply With Quote
Old 08-27-2003, 11:28 PM   #4 (permalink)
Registered User
 
BitSpit's Avatar
 
Join Date: Mar 2003
Location: Glasgow, KY
Posts: 150
BitSpit is on a distinguished road
Send a message via ICQ to BitSpit Send a message via Yahoo to BitSpit
When I created that, Excel decide to be a little screwy. This revised formula will do it without requiring reformating the cells.

=IF(A1>=DATEVALUE("01/01/03"),IF(A1<=DATEVALUE("02/01/03"),1,0),0)
BitSpit is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 06:05 AM.