Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Date from one cell to format another, then...
Anybody?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell Format Overrides to Date Format | Excel Worksheet Functions | |||
How can I get date of file creation to XLS cell in date format? | Excel Worksheet Functions | |||
Is Cell in Date Format | Excel Programming | |||
How do I format a cell to a date format? | Excel Discussion (Misc queries) | |||
cell format for date/time in same cell excel 2003 | Excel Worksheet Functions |