Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Date Removal

Hello,
I have a report that contains dates in column B, these dates can be
repeated many times and span everyday of the year. I wish to delete all rows
that contain a Saturday date in column B.
Is there a way to do this in vba without having to use the exact Saturday
Date in the code. I saw a Function called Weekday, which used the value 7 to
represent Saturdays. My vba skills are weak and I am unable to apply this
function properly.
Any help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Date Removal

I'd probably add a helper column and enter = WEEKDAY(). Then I'd use
autofilter to find the WEEKDAY that matches Saturday. From there, I'd delete
the row.

HTH,
Barb Reinhardt

"Grunt" wrote:

Hello,
I have a report that contains dates in column B, these dates can be
repeated many times and span everyday of the year. I wish to delete all rows
that contain a Saturday date in column B.
Is there a way to do this in vba without having to use the exact Saturday
Date in the code. I saw a Function called Weekday, which used the value 7 to
represent Saturdays. My vba skills are weak and I am unable to apply this
function properly.
Any help?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Date Removal

Thank You for the reply Barb,
I was trying to avoid the helper column if I could, but I took your advice
and applied the weekday function in this manner and it does get the job done.

Thanks again.

"Barb Reinhardt" wrote:

I'd probably add a helper column and enter = WEEKDAY(). Then I'd use
autofilter to find the WEEKDAY that matches Saturday. From there, I'd delete
the row.

HTH,
Barb Reinhardt

"Grunt" wrote:

Hello,
I have a report that contains dates in column B, these dates can be
repeated many times and span everyday of the year. I wish to delete all rows
that contain a Saturday date in column B.
Is there a way to do this in vba without having to use the exact Saturday
Date in the code. I saw a Function called Weekday, which used the value 7 to
represent Saturdays. My vba skills are weak and I am unable to apply this
function properly.
Any help?

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
Removal Date Andri Excel Worksheet Functions 3 February 8th 10 03:48 PM
Removal of Zero vmohan1978 Excel Worksheet Functions 4 January 24th 10 07:29 AM
paranthesis removal RADM Excel Worksheet Functions 1 May 11th 07 05:13 PM
.xla removal Coza Excel Programming 9 April 10th 07 02:31 AM
Add-in removal Rob Hoffy Excel Programming 4 April 8th 05 03:42 AM


All times are GMT +1. The time now is 10:01 AM.

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

About Us

"It's about Microsoft Excel"