Copying formulas

B

bridgeb3

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?
 
P

Pete_UK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top