Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Get Date from one cell to format another, then...

I want to take/copy/whatever? the date from a particular cell in the format
DD-MMM-YYYY, from there I want to format that date into MMM-YY into another
cell. After that has been complete, take that formatted date and auto fill 6
more columns with the past 6 months.

Another way to look at it:

(Take Cell A1) 18-JUN-2008 (Format Cell D1 like this) JUN-2008 (Then
auto fill F1:L1)JUN-2008 to JAN-2008

Please help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get Date from one cell to format another, then...

Assuming you want a more general solution involving columns rather than a
single instance. Using your posted samples, select Column D and use Format
Cells with this custom format pattern, "mmm-yy" (assuming your example
incorrectly shows a 4-digit year when your text description said you want a
2-digit year), then select Columns F thru L and use Format Cells to custom
format them using this custom format pattern, "mmm-yyyy". Next, put this
formula in D1...

=IF(A1<"",A1,"")

Then put this formula in F1...

=IF(A1<"",A1,"")

And put this formula in G1 and *copy* it across to L1...

=IF(A1<"",F1+1,"")

Then select D1 and F1 thru L1 and *copy* them down as far as you like.

Rick


"MattyO" wrote in message
...
I want to take/copy/whatever? the date from a particular cell in the format
DD-MMM-YYYY, from there I want to format that date into MMM-YY into
another
cell. After that has been complete, take that formatted date and auto
fill 6
more columns with the past 6 months.

Another way to look at it:

(Take Cell A1) 18-JUN-2008 (Format Cell D1 like this) JUN-2008 (Then
auto fill F1:L1)JUN-2008 to JAN-2008

Please help.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Get Date from one cell to format another, then...

Rick,

I'm very new at this. Can you provide me all the code?

"Rick Rothstein (MVP - VB)" wrote:

Assuming you want a more general solution involving columns rather than a
single instance. Using your posted samples, select Column D and use Format
Cells with this custom format pattern, "mmm-yy" (assuming your example
incorrectly shows a 4-digit year when your text description said you want a
2-digit year), then select Columns F thru L and use Format Cells to custom
format them using this custom format pattern, "mmm-yyyy". Next, put this
formula in D1...

=IF(A1<"",A1,"")

Then put this formula in F1...

=IF(A1<"",A1,"")

And put this formula in G1 and *copy* it across to L1...

=IF(A1<"",F1+1,"")

Then select D1 and F1 thru L1 and *copy* them down as far as you like.

Rick


"MattyO" wrote in message
...
I want to take/copy/whatever? the date from a particular cell in the format
DD-MMM-YYYY, from there I want to format that date into MMM-YY into
another
cell. After that has been complete, take that formatted date and auto
fill 6
more columns with the past 6 months.

Another way to look at it:

(Take Cell A1) 18-JUN-2008 (Format Cell D1 like this) JUN-2008 (Then
auto fill F1:L1)JUN-2008 to JAN-2008

Please help.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get Date from one cell to format another, then...

What I provided you is not code... those are worksheet formats (Format/Cells
from Excel's menu bar) and worksheet formulas (type them into the cells
where I indicated).

Rick


"MattyO" wrote in message
...
Rick,

I'm very new at this. Can you provide me all the code?

"Rick Rothstein (MVP - VB)" wrote:

Assuming you want a more general solution involving columns rather than a
single instance. Using your posted samples, select Column D and use
Format
Cells with this custom format pattern, "mmm-yy" (assuming your example
incorrectly shows a 4-digit year when your text description said you want
a
2-digit year), then select Columns F thru L and use Format Cells to
custom
format them using this custom format pattern, "mmm-yyyy". Next, put this
formula in D1...

=IF(A1<"",A1,"")

Then put this formula in F1...

=IF(A1<"",A1,"")

And put this formula in G1 and *copy* it across to L1...

=IF(A1<"",F1+1,"")

Then select D1 and F1 thru L1 and *copy* them down as far as you like.

Rick


"MattyO" wrote in message
...
I want to take/copy/whatever? the date from a particular cell in the
format
DD-MMM-YYYY, from there I want to format that date into MMM-YY into
another
cell. After that has been complete, take that formatted date and auto
fill 6
more columns with the past 6 months.

Another way to look at it:

(Take Cell A1) 18-JUN-2008 (Format Cell D1 like this) JUN-2008
(Then
auto fill F1:L1)JUN-2008 to JAN-2008

Please help.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Get Date from one cell to format another, then...

Do you cross year boundaries? e.g. startdate of FEB-2008, which would cross
back into 2007. This makes the problem a little more complex.
--
Merle


"MattyO" wrote:

I want to take/copy/whatever? the date from a particular cell in the format
DD-MMM-YYYY, from there I want to format that date into MMM-YY into another
cell. After that has been complete, take that formatted date and auto fill 6
more columns with the past 6 months.

Another way to look at it:

(Take Cell A1) 18-JUN-2008 (Format Cell D1 like this) JUN-2008 (Then
auto fill F1:L1)JUN-2008 to JAN-2008

Please help.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Get Date from one cell to format another, then...

Yes, it can cross into year boundaries. To provide further detail, I am
trying to add this additional code into an existing macro to handle some
additional formatting of a report that could be run every month. Apologies
for not adding these further details earlier.

"MerleSmith" wrote:

Do you cross year boundaries? e.g. startdate of FEB-2008, which would cross
back into 2007. This makes the problem a little more complex.
--
Merle


"MattyO" wrote:

I want to take/copy/whatever? the date from a particular cell in the format
DD-MMM-YYYY, from there I want to format that date into MMM-YY into another
cell. After that has been complete, take that formatted date and auto fill 6
more columns with the past 6 months.

Another way to look at it:

(Take Cell A1) 18-JUN-2008 (Format Cell D1 like this) JUN-2008 (Then
auto fill F1:L1)JUN-2008 to JAN-2008

Please help.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Get Date from one cell to format another, then...

Anybody?
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
Cell Format Overrides to Date Format Mary Excel Worksheet Functions 0 September 1st 09 07:37 PM
How can I get date of file creation to XLS cell in date format? Radek Simek Excel Worksheet Functions 3 November 8th 07 04:24 PM
Is Cell in Date Format [email protected] Excel Programming 7 May 29th 07 05:46 PM
How do I format a cell to a date format? trainer07 Excel Discussion (Misc queries) 1 June 23rd 06 03:45 PM
cell format for date/time in same cell excel 2003 Sandy Excel Worksheet Functions 1 January 18th 06 03:46 AM


All times are GMT +1. The time now is 06:00 PM.

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

About Us

"It's about Microsoft Excel"