Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This is probably very simple, but no amount of caffeine is helping me think
this morning- so I'm hoping I can get help. Cell A2: =YEAR(C2) Cell B2: =INT((MONTH(C2)-1)/3)+1 These two cells return the value of Year and Quarter for a date that is posted in Cell C2. What I'd like is to be able to have NO value returned if there is a date in this cell. Currently if the cell is empty, Cell A2 defaults to year 1900, and Cell A3 returns 1 for 1st Quarter. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(C2="","",YEAR(C2))
=IF(C2="","",INT((MONTH(C2)-1)/3)+1) -- Gary''s Student - gsnu200796 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I think you had a typo and meant this:
Cell A2: =IF(C2="","",YEAR(C2)) Cell B2: =IF(C2="","",INT((MONTH(C2)-1)/3)+1) Hope this helps. Pete On Jul 25, 4:43*pm, Gina wrote: This is probably very simple, but no amount of caffeine is helping me think this morning- so I'm hoping I can get help. Cell A2: *=YEAR(C2) Cell B2: =INT((MONTH(C2)-1)/3)+1 These two cells return the value of Year and Quarter for a date that is posted in Cell C2. *What I'd like is to be able to have NO value returned if there is a date in this cell. *Currently if the cell is empty, Cell A2 defaults to year 1900, and Cell A3 returns 1 for 1st Quarter. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way:
A2: =IF(C2="","",YEAR(C2)) etc. In article , Gina wrote: This is probably very simple, but no amount of caffeine is helping me think this morning- so I'm hoping I can get help. Cell A2: =YEAR(C2) Cell B2: =INT((MONTH(C2)-1)/3)+1 These two cells return the value of Year and Quarter for a date that is posted in Cell C2. What I'd like is to be able to have NO value returned if there is a date in this cell. Currently if the cell is empty, Cell A2 defaults to year 1900, and Cell A3 returns 1 for 1st Quarter. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(ISNUMBER(C2),YEAR(C2),"")
Hope this helps. Note: A date is actually just a number. You may wish to use Data Validation to ensure a date is entered into cell C2. If you do use data validation, you can use the following formula: =IF(ISBLANK(C2),"",YEAR(C2)) -- John C "Gina" wrote: This is probably very simple, but no amount of caffeine is helping me think this morning- so I'm hoping I can get help. Cell A2: =YEAR(C2) Cell B2: =INT((MONTH(C2)-1)/3)+1 These two cells return the value of Year and Quarter for a date that is posted in Cell C2. What I'd like is to be able to have NO value returned if there is a date in this cell. Currently if the cell is empty, Cell A2 defaults to year 1900, and Cell A3 returns 1 for 1st Quarter. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks guys. This worked great. I appreciate the help.
Gina "Pete_UK" wrote: I think you had a typo and meant this: Cell A2: =IF(C2="","",YEAR(C2)) Cell B2: =IF(C2="","",INT((MONTH(C2)-1)/3)+1) Hope this helps. Pete On Jul 25, 4:43 pm, Gina wrote: This is probably very simple, but no amount of caffeine is helping me think this morning- so I'm hoping I can get help. Cell A2: =YEAR(C2) Cell B2: =INT((MONTH(C2)-1)/3)+1 These two cells return the value of Year and Quarter for a date that is posted in Cell C2. What I'd like is to be able to have NO value returned if there is a date in this cell. Currently if the cell is empty, Cell A2 defaults to year 1900, and Cell A3 returns 1 for 1st Quarter. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome, Gina - I'm sure everyone appreciates the feedback.
Pete On Jul 25, 5:07*pm, Gina wrote: Thanks guys. *This worked great. *I appreciate the help. Gina "Pete_UK" wrote: I think you had a typo and meant this: Cell A2: *=IF(C2="","",YEAR(C2)) Cell B2: *=IF(C2="","",INT((MONTH(C2)-1)/3)+1) Hope this helps. Pete On Jul 25, 4:43 pm, Gina wrote: This is probably very simple, but no amount of caffeine is helping me think this morning- so I'm hoping I can get help. Cell A2: *=YEAR(C2) Cell B2: =INT((MONTH(C2)-1)/3)+1 These two cells return the value of Year and Quarter for a date that is posted in Cell C2. *What I'd like is to be able to have NO value returned if there is a date in this cell. *Currently if the cell is empty, Cell A2 defaults to year 1900, and Cell A3 returns 1 for 1st Quarter.- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Question | Excel Discussion (Misc queries) | |||
DATE Question | Excel Discussion (Misc queries) | |||
Date Question | Excel Discussion (Misc queries) | |||
Date Question | Excel Discussion (Misc queries) | |||
Date Question | Excel Discussion (Misc queries) |