Dates in macros

  • Thread starter Thread starter Zak
  • Start date Start date
Z

Zak

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.
 
Zak, format the entire column as "mmm-yy" and the Pivot Table should display
correctly.
 
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.
 
Thanks a million, worked fine.


Jim Thomlinson said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top