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

Hello,

I'm having an issue with dates (no, it's not a social problem, ha ha -- too
corny?). I have to determine what the month is for each date in a column,
and then insert that month into another cell. If the month is January
through September, i.e., 1 through 9, I need to insert that single digit into
this other cell; however if the month is October, November or December, I
need a special character to be inserted. October should be represeneted as
"}", November as "-" and December as "&". (These are the requirements of a
data file for a third party).

I wanted to do LEFT function combined with VLOOKUP to get the corresponding
values, but the way Excel stores dates is foiling my plan! Does anyone have
any suggestions? Any help is very appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Date problem

Hi

Assuming the dates are in column a and are true Excel dates, then
=CHOOSE(MONTH(A1),1,2,3,4,5,6,7,8,9,"}","-","&")

--
Regards

Roger Govier


"ehale" wrote in message
...
Hello,

I'm having an issue with dates (no, it's not a social problem, ha
ha -- too
corny?). I have to determine what the month is for each date in a
column,
and then insert that month into another cell. If the month is January
through September, i.e., 1 through 9, I need to insert that single
digit into
this other cell; however if the month is October, November or
December, I
need a special character to be inserted. October should be
represeneted as
"}", November as "-" and December as "&". (These are the requirements
of a
data file for a third party).

I wanted to do LEFT function combined with VLOOKUP to get the
corresponding
values, but the way Excel stores dates is foiling my plan! Does
anyone have
any suggestions? Any help is very appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 187
Default Date problem

Hi,

Assuming that date in A1, put the formula in B1:

=IF(MONTH(A1)=12,"&",(IF(MONTH(A1)=11,"-",IF(MONTH(A1)=10,"{",MONTH(A1)))))

Then copy and paste value column B.

Hope this helps.

Regards,

Jaleel



"ehale" wrote:

Hello,

I'm having an issue with dates (no, it's not a social problem, ha ha -- too
corny?). I have to determine what the month is for each date in a column,
and then insert that month into another cell. If the month is January
through September, i.e., 1 through 9, I need to insert that single digit into
this other cell; however if the month is October, November or December, I
need a special character to be inserted. October should be represeneted as
"}", November as "-" and December as "&". (These are the requirements of a
data file for a third party).

I wanted to do LEFT function combined with VLOOKUP to get the corresponding
values, but the way Excel stores dates is foiling my plan! Does anyone have
any suggestions? Any help is very appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Date problem

Thanks Roger, this works perfectly!

"Roger Govier" wrote:

Hi

Assuming the dates are in column a and are true Excel dates, then
=CHOOSE(MONTH(A1),1,2,3,4,5,6,7,8,9,"}","-","&")

--
Regards

Roger Govier


"ehale" wrote in message
...
Hello,

I'm having an issue with dates (no, it's not a social problem, ha
ha -- too
corny?). I have to determine what the month is for each date in a
column,
and then insert that month into another cell. If the month is January
through September, i.e., 1 through 9, I need to insert that single
digit into
this other cell; however if the month is October, November or
December, I
need a special character to be inserted. October should be
represeneted as
"}", November as "-" and December as "&". (These are the requirements
of a
data file for a third party).

I wanted to do LEFT function combined with VLOOKUP to get the
corresponding
values, but the way Excel stores dates is foiling my plan! Does
anyone have
any suggestions? Any help is very appreciated.




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
Static Date and Time code problem Laura Excel Discussion (Misc queries) 12 August 31st 07 07:04 AM
problem with date sorting Middletree Excel Worksheet Functions 1 August 16th 06 02:15 PM
date scale problem Mary Walker Excel Discussion (Misc queries) 6 August 13th 06 10:08 PM
Date is being changed to a number (problem) Luke Excel Discussion (Misc queries) 2 January 9th 06 02:59 PM
Imported Data Date Format Problem Craig Excel Discussion (Misc queries) 1 December 20th 05 02:23 PM


All times are GMT +1. The time now is 08:15 PM.

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"