Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates and Conditional Formatting
Assuming I have a Date column D
Question 1 When a date is entered into it, I would like: Cell E = x Weeks Cell F = y month - 1 day Cell G = z Months - 1 day Would I use an IF Then statement to achieve this? Could anyone provide a VBA example I could work from? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates and Conditional Formatting
I am not quite sure what you want for Cell F... what is "month" (singular)
minus a day supposed to be? Also, the weeks and months (plural)... are those from the beginning of the year? If so, how are the weeks measured... each 7 day period starting from January 1st? Or is week #1 the week January 1st falls in, no matter what day of the week that is? Or do you have one of those other criteria for determining which week is week #1? Rick "Dermot" wrote in message ... Assuming I have a Date column D Question 1 When a date is entered into it, I would like: Cell E = x Weeks Cell F = y month - 1 day Cell G = z Months - 1 day Would I use an IF Then statement to achieve this? Could anyone provide a VBA example I could work from? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates and Conditional Formatting
Hi Rick
Thanks for the reply. My explanation wasn't that great..... The dates x y and z are relative to the Date in Column D. For Example: Cell E = 10 Oct 07 to 14 November 2007 [5 weeks (35 Days)] Cell F = 10 Oct 07 to 9 Nov 07 = (1 month - 1 Day) Cell G = 10 Oct 07 to 10 Mar 09 = (18 months - 1 day) "Rick Rothstein (MVP - VB)" wrote: I am not quite sure what you want for Cell F... what is "month" (singular) minus a day supposed to be? Also, the weeks and months (plural)... are those from the beginning of the year? If so, how are the weeks measured... each 7 day period starting from January 1st? Or is week #1 the week January 1st falls in, no matter what day of the week that is? Or do you have one of those other criteria for determining which week is week #1? Rick "Dermot" wrote in message ... Assuming I have a Date column D Question 1 When a date is entered into it, I would like: Cell E = x Weeks Cell F = y month - 1 day Cell G = z Months - 1 day Would I use an IF Then statement to achieve this? Could anyone provide a VBA example I could work from? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates and Conditional Formatting
Sorry Rick,
I made an error the Cell F = 10 Oct 07 to 9 Nov 07 = (1 month - 1 Day) Should read: Cell F = 10 Oct 07 to 9 April 07 (6 Months - 1 day) "Dermot" wrote: Hi Rick Thanks for the reply. My explanation wasn't that great..... The dates x y and z are relative to the Date in Column D. For Example: Cell E = 10 Oct 07 to 14 November 2007 [5 weeks (35 Days)] Cell F = 10 Oct 07 to 9 Nov 07 = (1 month - 1 Day) Cell G = 10 Oct 07 to 10 Mar 09 = (18 months - 1 day) "Rick Rothstein (MVP - VB)" wrote: I am not quite sure what you want for Cell F... what is "month" (singular) minus a day supposed to be? Also, the weeks and months (plural)... are those from the beginning of the year? If so, how are the weeks measured... each 7 day period starting from January 1st? Or is week #1 the week January 1st falls in, no matter what day of the week that is? Or do you have one of those other criteria for determining which week is week #1? Rick "Dermot" wrote in message ... Assuming I have a Date column D Question 1 When a date is entered into it, I would like: Cell E = x Weeks Cell F = y month - 1 day Cell G = z Months - 1 day Would I use an IF Then statement to achieve this? Could anyone provide a VBA example I could work from? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting Dates | Excel Discussion (Misc queries) | |||
Conditional formatting from Dates | Excel Worksheet Functions | |||
conditional formatting using dates | Excel Discussion (Misc queries) | |||
Conditional Formatting (Dates) | Excel Discussion (Misc queries) | |||
Conditional Formatting with Dates | Excel Worksheet Functions |