Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default Formula changes when row is pasted in a different worksheet

Hi all,
I have a workbook with 2 identical worksheets. When data in one row in the
1st worksheet is no longer needed, I cut the whole row and paste it in the
second worksheet. I noticed that when i do so, the formulas change. For
example, i have a formula in the 1st worksheet to calculate a person's age:

=IF(E:E="","",(TODAY()-E:E)/365)

When i cut the row that contains this formula and paste it - say in row 30
of the second worksheet, the formula automatically turns into:

=IF(E$30:E$30="","",(TODAY()-E$30:E$30)/365)

The result of both formulas is the same. However, an a few occasions, the
formula changed to something like:

=IF(E$26:E$27="","",(TODAY()-E$26:E$27)/365) (which refers to 2 different
rows: 26 and 27)

The result for that last formula however was #VALUE!

I would like to know why this happens and how i can possibly prevent it.
Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formula changes when row is pasted in a different worksheet

The way I would prevent it is by not using formulas like:
=IF(E:E="","",(TODAY()-E:E)/365)

Although excel accepts this style and figures out what you want, I find using
the more explicit:

=if(e1="","",(today()-e1)/365)

ps.

You may want to read Chip Pearson's notes for =datedif():
http://www.cpearson.com/excel/datedif.htm

Tendresse wrote:

Hi all,
I have a workbook with 2 identical worksheets. When data in one row in the
1st worksheet is no longer needed, I cut the whole row and paste it in the
second worksheet. I noticed that when i do so, the formulas change. For
example, i have a formula in the 1st worksheet to calculate a person's age:

=IF(E:E="","",(TODAY()-E:E)/365)

When i cut the row that contains this formula and paste it - say in row 30
of the second worksheet, the formula automatically turns into:

=IF(E$30:E$30="","",(TODAY()-E$30:E$30)/365)

The result of both formulas is the same. However, an a few occasions, the
formula changed to something like:

=IF(E$26:E$27="","",(TODAY()-E$26:E$27)/365) (which refers to 2 different
rows: 26 and 27)

The result for that last formula however was #VALUE!

I would like to know why this happens and how i can possibly prevent it.
Many thanks


--

Dave Peterson
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
Getting #REF1 because re-pasted a replacement worksheet Phillip Mitchell Excel Discussion (Misc queries) 0 May 9th 06 10:31 AM
Same formula referencing same cells returns incorrect results, randomly, when pasted into new worksheet [email protected] Excel Worksheet Functions 1 March 9th 06 07:55 PM
Password protection of worksheet when copied and pasted. Shansi Excel Worksheet Functions 1 July 30th 05 12:23 AM
How do I protect a worksheet from being copied & pasted? JJ Excel Discussion (Misc queries) 3 July 28th 05 02:07 PM
Validating data pasted into worksheet Tom F. Excel Discussion (Misc queries) 3 July 20th 05 06:05 PM


All times are GMT +1. The time now is 11:16 PM.

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

About Us

"It's about Microsoft Excel"