#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Date Question

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Date Question

=IF(C2="","",YEAR(C2))
=IF(C2="","",INT((MONTH(C2)-1)/3)+1)
--
Gary''s Student - gsnu200796
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Date Question

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Date Question

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Date Question

=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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Date Question

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Date Question

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
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
Date Question [email protected].(donotspam) Excel Discussion (Misc queries) 2 May 23rd 08 03:30 PM
DATE Question jlynn2000 Excel Discussion (Misc queries) 6 December 8th 06 03:43 PM
Date Question metaltecks Excel Discussion (Misc queries) 5 June 13th 06 02:55 PM
Date Question nastech Excel Discussion (Misc queries) 5 January 19th 06 09:40 PM
Date Question John Excel Discussion (Misc queries) 4 January 15th 06 06:33 PM


All times are GMT +1. The time now is 01:16 AM.

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

About Us

"It's about Microsoft Excel"