Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Dates in macros

How can i tell a macro to look for dates (in format dd/mm/yy) in column X and
change it to mmm-yy (oct 07) format? i did this via format cells but as i am
using a pivot table afterwards the pivot table still some how picks the date
up in its original form as opposed to the new form. so a macro would prob do
the job better.

thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Dates in macros

Zak, format the entire column as "mmm-yy" and the Pivot Table should display
correctly.
--
Charles Chickering

"A good example is twice the value of good advice."


"Zak" wrote:

How can i tell a macro to look for dates (in format dd/mm/yy) in column X and
change it to mmm-yy (oct 07) format? i did this via format cells but as i am
using a pivot table afterwards the pivot table still some how picks the date
up in its original form as opposed to the new form. so a macro would prob do
the job better.

thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Dates in macros

Excel stores dates as a number and then formats that number to look like a
date. By changing the format in the spreadsheet you do not change the
underlying number. So when you create your pivot table it does not pick up
the format it just picks up the number. You need to format the date in the
pivot table. Right click the date and select Field Settings - Number... and
format the date as necessary.
--
HTH...

Jim Thomlinson


"Zak" wrote:

How can i tell a macro to look for dates (in format dd/mm/yy) in column X and
change it to mmm-yy (oct 07) format? i did this via format cells but as i am
using a pivot table afterwards the pivot table still some how picks the date
up in its original form as opposed to the new form. so a macro would prob do
the job better.

thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Dates in macros


Thanks a million, worked fine.


"Jim Thomlinson" wrote:

Excel stores dates as a number and then formats that number to look like a
date. By changing the format in the spreadsheet you do not change the
underlying number. So when you create your pivot table it does not pick up
the format it just picks up the number. You need to format the date in the
pivot table. Right click the date and select Field Settings - Number... and
format the date as necessary.
--
HTH...

Jim Thomlinson


"Zak" wrote:

How can i tell a macro to look for dates (in format dd/mm/yy) in column X and
change it to mmm-yy (oct 07) format? i did this via format cells but as i am
using a pivot table afterwards the pivot table still some how picks the date
up in its original form as opposed to the new form. so a macro would prob do
the job better.

thanks.

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
dates in macros Max Scott Excel Programming 10 December 16th 07 06:11 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
How do I convert Dates from Text back to Date format using macros Frank Kabel Excel Programming 0 July 29th 04 03:40 PM
Using dates in macros zack[_2_] Excel Programming 2 June 29th 04 08:47 AM


All times are GMT +1. The time now is 12:41 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"