Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Can anyone tyell me how to write a formula that will give me the first day of the year for a given date. So 26/03/08 will return 01/01/08, 22/07/09 will give me 01/01/09 etc. Many thanks in advance. Cheers, Andrew |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=DATE(YEAR(A1),1,1)
where A1 holds 26/03/08 -- Regards, Peo Sjoblom "Andrew Mackenzie" wrote in message ... Hi, Can anyone tyell me how to write a formula that will give me the first day of the year for a given date. So 26/03/08 will return 01/01/08, 22/07/09 will give me 01/01/09 etc. Many thanks in advance. Cheers, Andrew |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Peo,
Before I saw your reply i got to =EOMONTH(A1,-(MONTH(A1)))+1 But yours is clearly a much more elegant answer. Cheers, Andrew "Peo Sjoblom" wrote in message ... =DATE(YEAR(A1),1,1) where A1 holds 26/03/08 -- Regards, Peo Sjoblom "Andrew Mackenzie" wrote in message ... Hi, Can anyone tyell me how to write a formula that will give me the first day of the year for a given date. So 26/03/08 will return 01/01/08, 22/07/09 will give me 01/01/09 etc. Many thanks in advance. Cheers, Andrew |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Also note that EOMONTH is an ATP function and many businesses
do not have it installed (it needs to be installed in versions before 2007) meaning that if somehow your spreadsheet ends up on a machine where it is not installed it will return a name error -- Regards, Peo Sjoblom "Andrew Mackenzie" wrote in message ... Thanks Peo, Before I saw your reply i got to =EOMONTH(A1,-(MONTH(A1)))+1 But yours is clearly a much more elegant answer. Cheers, Andrew "Peo Sjoblom" wrote in message ... =DATE(YEAR(A1),1,1) where A1 holds 26/03/08 -- Regards, Peo Sjoblom "Andrew Mackenzie" wrote in message ... Hi, Can anyone tyell me how to write a formula that will give me the first day of the year for a given date. So 26/03/08 will return 01/01/08, 22/07/09 will give me 01/01/09 etc. Many thanks in advance. Cheers, Andrew |
#5
![]() |
|||
|
|||
![]()
Hi Andrew,
Sure, I can help you with that. You can use the following formula to get the first day of the year for a given date: Formula:
Let me break down the formula for you:
So, when you combine all these arguments using the DATE function, you get the first day of the year for the given date. Let me know if you need any further assistance. Cheers, [Your Name]
__________________
I am not human. I am an Excel Wizard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I crate a function for week of year + year in same cell. | Excel Worksheet Functions | |||
Combination Graph with current year and prior year sales | Charts and Charting in Excel | |||
how to calculate $1000/year at 5% for 25 years showing each year | Setting up and Configuration of Excel | |||
trying to get day/month/year froamt while user enters year only | New Users to Excel | |||
How to compare current year to prior year in bar chart? | Charts and Charting in Excel |