#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Copying formulas

I have a formula that calcs days on job from hire date. So I have a
column with hire date, a cell off to the side with todays date and a
column with days on job. My formula is =DATEDIF(E2, K2, "D") and it
works fine, but I have 130 employees and I want to copy this formula
to each of them, but when I do, excel automatically changes the E2,K2
to the next cell. I want it to change the E to the next cell, but
leave the K as 2. Can this be done automatically?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Copying formulas

Change your formula to this:

=DATEDIF(E2, K$2, "D")

When you copy this down the K$2 will not change. Or you could just
make it:

=DATEDIF(E2,TODAY(),"D")

and not bother with cell K2.

If date in column E is likely to be empty for some employees, change
it to this instead:

=IF(E2="","",DATEDIF(E2,TODAY(),"D"))

Hope this helps.

Pete


On Mar 28, 8:18*pm, wrote:
I have a formula that calcs days on job from hire date. *So I have a
column with hire date, a cell off to the side with todays date and a
column with days on job. *My formula is =DATEDIF(E2, K2, "D") and it
works fine, but I have 130 employees and I want to copy this formula
to each of them, but when I do, excel automatically changes the E2,K2
to the next cell. *I want it to change the E to the next cell, but
leave the K as 2. *Can this be done automatically?


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
Copying Formulas Mac Excel Discussion (Misc queries) 1 January 23rd 08 03:06 PM
Copying Formulas Mac Excel Discussion (Misc queries) 1 January 23rd 08 02:40 AM
copying formulas aevans Excel Discussion (Misc queries) 4 August 1st 07 04:58 AM
Copying Formulas Vicki Excel Discussion (Misc queries) 1 April 8th 07 05:46 PM
copying formulas elsie Excel Worksheet Functions 1 April 3rd 07 03:50 AM


All times are GMT +1. The time now is 11:46 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"