Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF Function Problem Excel 2000

I'm trying to calculate a formula in Excel using the IF function. Here is my
code.

=IF(B2=9/1/2006,5,IF(B2=6/1/2006,4,IF(B2=3/1/2006,3,IF(B2=1/1/2006,2,IF(B2=9/1/2005,1,0)))))

Basically this is what I want returned.

If B2=9/1/2006 then it equals 5
If B2=6/1/2006 then it equals 4
If B2=3/1/2006 then it equals 3
If B2=1/1/2006 then it equals 2
If B2=9/1/2005 then it equals 1

I have a feeling the my setup in the formula is rubbish. But what is making
me scratch my head the most is that it worked perfectly fine before! Any
help would be ultra appreciated. Thank you much! Have a nice day.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default IF Function Problem Excel 2000

Try this:

IF(B2=DATEVALUE("9/1/2006"),5,IF(B2=DATEVALUE("6/1/2006"),4,IF(B2=DATEVALUE("3/1/2006"),3,IF(B2=DATEVALUE("1/1/2006"),2,IF(B2=DATEVALUE("9/1/2005"),1,0)))))

HTH

sqlfan13

"david@pcm" wrote:

I'm trying to calculate a formula in Excel using the IF function. Here is my
code.

=IF(B2=9/1/2006,5,IF(B2=6/1/2006,4,IF(B2=3/1/2006,3,IF(B2=1/1/2006,2,IF(B2=9/1/2005,1,0)))))

Basically this is what I want returned.

If B2=9/1/2006 then it equals 5
If B2=6/1/2006 then it equals 4
If B2=3/1/2006 then it equals 3
If B2=1/1/2006 then it equals 2
If B2=9/1/2005 then it equals 1

I have a feeling the my setup in the formula is rubbish. But what is making
me scratch my head the most is that it worked perfectly fine before! Any
help would be ultra appreciated. Thank you much! Have a nice day.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default IF Function Problem Excel 2000

You might try:

=IF(B2=38961,5,IF(B2=38869,4,IF(B2=38777,3,IF(B 2=38718,2,IF(B2=38596,1,0)))))

HTH,
Paul
"david@pcm" wrote in message
...
I'm trying to calculate a formula in Excel using the IF function. Here is
my
code.

=IF(B2=9/1/2006,5,IF(B2=6/1/2006,4,IF(B2=3/1/2006,3,IF(B2=1/1/2006,2,IF(B2=9/1/2005,1,0)))))

Basically this is what I want returned.

If B2=9/1/2006 then it equals 5
If B2=6/1/2006 then it equals 4
If B2=3/1/2006 then it equals 3
If B2=1/1/2006 then it equals 2
If B2=9/1/2005 then it equals 1

I have a feeling the my setup in the formula is rubbish. But what is
making
me scratch my head the most is that it worked perfectly fine before! Any
help would be ultra appreciated. Thank you much! Have a nice day.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default IF Function Problem Excel 2000

Hi David

If you wanted a formula solution rather than using multiple IF
statements, then try

=INT(MOD((MONTH(A1)+3),12)/3)+1
+4*(DATEDIF(DATE(2005,9,1),A1,"Y"))

--
Regards

Roger Govier


"david@pcm" wrote in message
...
I'm trying to calculate a formula in Excel using the IF function.
Here is my
code.

=IF(B2=9/1/2006,5,IF(B2=6/1/2006,4,IF(B2=3/1/2006,3,IF(B2=1/1/2006,2,IF(B2=9/1/2005,1,0)))))

Basically this is what I want returned.

If B2=9/1/2006 then it equals 5
If B2=6/1/2006 then it equals 4
If B2=3/1/2006 then it equals 3
If B2=1/1/2006 then it equals 2
If B2=9/1/2005 then it equals 1

I have a feeling the my setup in the formula is rubbish. But what is
making
me scratch my head the most is that it worked perfectly fine before!
Any
help would be ultra appreciated. Thank you much! Have a nice day.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default IF Function Problem Excel 2000

=LOOKUP(B2,--{0,"9/1/5","1/1/6","3/1/6","6/1/6","9/1/6"},{0,1,2,3,4,5})



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Excel 2000 VBA Application on Excel 2003 Excel Worksheet Functions 0 August 8th 06 02:36 AM
Excel problem Office 2000 Illegal operation...? Help... paul Excel Discussion (Misc queries) 0 April 6th 06 11:36 PM
=HYPERLINK function and Excel 2003 problem. [email protected] Excel Worksheet Functions 1 February 10th 06 03:14 PM
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM
Excel 2000 shared workbook problem Musick Excel Discussion (Misc queries) 0 February 3rd 05 03:55 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"