Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tanya
 
Posts: n/a
Default If statement with date

I'm trying to return new salary information based on a hire date. The
criteria is if you were hired on or before Jan. 1, 2005, you get 3% of the
mid-point of your current salary range. I have the spreadsheet set up as
follows:

A1 B1 C1 D1 E1
Current sal hire date PG mid-point new salary
40,950.00 12/15/03 15 52,460.00 ????

I was using the formula in E1:
=If(B11/1/05,(D1*.03)+A1,A1)

But when I entered a hire date that was after 1/1/05, it was still adding
the 3%. What am I doing wrong?
  #2   Report Post  
Pat Flynn
 
Posts: n/a
Default

Use B1<1/1/05 and it will work
Pat

"Tanya" wrote:

I'm trying to return new salary information based on a hire date. The
criteria is if you were hired on or before Jan. 1, 2005, you get 3% of the
mid-point of your current salary range. I have the spreadsheet set up as
follows:

A1 B1 C1 D1 E1
Current sal hire date PG mid-point new salary
40,950.00 12/15/03 15 52,460.00 ????

I was using the formula in E1:
=If(B11/1/05,(D1*.03)+A1,A1)

But when I entered a hire date that was after 1/1/05, it was still adding
the 3%. What am I doing wrong?

  #3   Report Post  
Mexage
 
Posts: n/a
Default

The problem would be the way you are entering the date in the If statement.

Try to type the date in a cell, and then compare among two cells.

=If(B1$F$1,(D1*.03)+A1,A1)

Where the cell F1 contains the date (1/1/05)

The thing is that Excel interprets 1/1/05 as a series of divisions, which
leads to the result of 1/5 (0.2)

Hope that helps. Please rate this post.

"Tanya" wrote:

I'm trying to return new salary information based on a hire date. The
criteria is if you were hired on or before Jan. 1, 2005, you get 3% of the
mid-point of your current salary range. I have the spreadsheet set up as
follows:

A1 B1 C1 D1 E1
Current sal hire date PG mid-point new salary
40,950.00 12/15/03 15 52,460.00 ????

I was using the formula in E1:
=If(B11/1/05,(D1*.03)+A1,A1)

But when I entered a hire date that was after 1/1/05, it was still adding
the 3%. What am I doing wrong?

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Excel sees 1/1/05 as a couple of divisions. 1 divided by 1 divided by 5.

I like this style to use with dates:

=IF(B1DATE(2005,1,1),(D1*0.03)+A1,A1)



Tanya wrote:

I'm trying to return new salary information based on a hire date. The
criteria is if you were hired on or before Jan. 1, 2005, you get 3% of the
mid-point of your current salary range. I have the spreadsheet set up as
follows:

A1 B1 C1 D1 E1
Current sal hire date PG mid-point new salary
40,950.00 12/15/03 15 52,460.00 ????

I was using the formula in E1:
=If(B11/1/05,(D1*.03)+A1,A1)

But when I entered a hire date that was after 1/1/05, it was still adding
the 3%. What am I doing wrong?


--

Dave Peterson
  #5   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 19 May 2005 16:22:03 -0700, "Tanya"
wrote:

I was using the formula in E1:
=If(B11/1/05,(D1*.03)+A1,A1)

But when I entered a hire date that was after 1/1/05, it was still adding
the 3%. What am I doing wrong?


for 1/1/05 to be interpreted as a date, it must either be enclosed in quote
marks or the result of a function (or cell reference).

=If(B1"1/1/05",(D1*.03)+A1,A1)

=If(B1DATE(2005,1,1),(D1*.03)+A1,A1)

=If(B1$Z$2,(D1*.03)+A1,A1) 'where Z2 contains the date 1/1/05


--ron
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
How do I get an IF statement to pull a date range?? Brooke Medvecky Excel Worksheet Functions 9 April 19th 06 08:48 PM
Using date function in an if statement M Smith Excel Worksheet Functions 2 March 30th 05 06:53 PM
Date in an IF statement LyndieBee Excel Worksheet Functions 2 March 8th 05 04:11 PM
Date related IF statement Miss Candace Excel Worksheet Functions 1 February 28th 05 06:22 PM
Date related IF statement Miss Candace Excel Worksheet Functions 1 February 28th 05 04:32 PM


All times are GMT +1. The time now is 05:00 PM.

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"