Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Shade date headers, if Weekends or Holidays

Sheet1 with Column Date headers, for the next 18 Months.
Sheet2 with Holidays Dates in Column A
Questions :
1. How do I shade the headers with VBA for Weekends & Holidays ?
2. How do I, on Button-Click, Toggle Hide / Unhide the columns with
shaded headers
Thank you for your help,

Celeste
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Shade date headers, if Weekends or Holidays

First, you're going to have to create a named range for HOLIDAYS on Sheet2.
If you have a header in Sheet2!A1 try this

=OFFSET(Sheet2!A1,1,0,COUNT(Sheet2!$A:$A)-1,1)

If there is no header, use this

=OFFSET(Sheet2!A1,0,0,COUNT(Sheet2!$A:$A),1)

For the conditional format, put this

=OR(WEEKDAY(A1,2)=6,ISNUMBER(VLOOKUP(A1,HOLIDAYS, 1,FALSE)))
--
HTH,
Barb Reinhardt



"u473" wrote:

Sheet1 with Column Date headers, for the next 18 Months.
Sheet2 with Holidays Dates in Column A
Questions :
1. How do I shade the headers with VBA for Weekends & Holidays ?
2. How do I, on Button-Click, Toggle Hide / Unhide the columns with
shaded headers
Thank you for your help,

Celeste

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
Formula for adding days to a date excluding weekends and holidays? Jake via OfficeKB.com Excel Discussion (Misc queries) 3 May 20th 23 07:48 PM
Date/Time Difference Excluding Weekends & Holidays Paula D Excel Worksheet Functions 3 June 29th 12 11:15 PM
Calculate A Date Excluding Weekends And Holidays travelersway New Users to Excel 10 February 9th 12 07:34 PM
Calculate End Date (excluding weekends and holidays) guitaronmyback Excel Worksheet Functions 6 May 6th 09 10:17 PM
Calculate A Date Excluding Weekends And Holidays travelersway New Users to Excel 1 February 8th 06 08:56 PM


All times are GMT +1. The time now is 04:12 AM.

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"