![]() |
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? |
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? |
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? |
All times are GMT +1. The time now is 01:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com