ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   same formula giving diff resutls (https://www.excelbanter.com/excel-worksheet-functions/28347-same-formula-giving-diff-resutls.html)

[email protected]

same formula giving diff resutls
 
A3=16/05/2005
A4=A3+29

I did a fill down, past A30. So all down column A I have 29 being added
to the date in the cell above.

I replaced the formula in A28 with =Year(A27) But it just gave a date.
Then, I put the same foruma i.e. =Year(A27), into a cell within
column B, like B9 and I got the right answer.

Has filling down somehow tainted cells I filled in column A?!
Both A28 and B9 have the same formula, but only B9 gives the correct
result. A28 givesa date instead of a year, even though the forumla in
there is =Year(A27).


Peo Sjoblom

It gives the same result. Dates in Excel are nothing but numbers starting
with number 0 on Jan 0 1900 then for every day is 1 added so today is the
same as 38501 days after Jan 0 1900 and when you copy down a formula you
will also copy the formatting which Excel interprets as a date and if you
would have looked at the date you would have noticed that the year of the
date in the cell with =YEAR(A27) is 1905 and if you just format A28 as
General you will get 2007 and if you put 2007 in an empty cell and format as
date you will get 2007 days after Jan 0 1900 which is the same as

29/6/1905


--
Regards,

Peo Sjoblom


wrote in message
oups.com...
A3=16/05/2005
A4=A3+29

I did a fill down, past A30. So all down column A I have 29 being added
to the date in the cell above.

I replaced the formula in A28 with =Year(A27) But it just gave a date.
Then, I put the same foruma i.e. =Year(A27), into a cell within
column B, like B9 and I got the right answer.

Has filling down somehow tainted cells I filled in column A?!
Both A28 and B9 have the same formula, but only B9 gives the correct
result. A28 givesa date instead of a year, even though the forumla in
there is =Year(A27).




All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com