Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default 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
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
Conditional Formatting Dates Katie Schertzing Excel Discussion (Misc queries) 1 February 18th 10 06:13 PM
Conditional formatting from Dates DavidM Excel Worksheet Functions 3 June 11th 09 05:00 PM
conditional formatting using dates creynolds Excel Discussion (Misc queries) 1 August 8th 06 12:30 AM
Conditional Formatting (Dates) d_birr77 Excel Discussion (Misc queries) 6 July 20th 05 12:40 AM
Conditional Formatting with Dates WLMPilot Excel Worksheet Functions 2 May 3rd 05 05:22 PM


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