Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting Specific Rows - urgent

I have a column that lists the days of the months. Every month has
different days with the corresponding dates. Is there a way I can get
all of the SUNDAY rows to be deleted?


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting Specific Rows - urgent

In an adjacent column enter =weekday(your date) and copy down for the
length of the list.
Where 'your date' is a reference to the dates in your list.

Tehn autofilter the range for values of 1 (that is Sunday).

Then delete the rows, then delete the column of =weekday() formulas.

Hope it helps.


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting Specific Rows - urgent

Is there a way to automate the process using VB Script?
I want to create a Command Button that if pressed, will delete al
sundays data (the rows from a1 to whatever cell)..

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting Specific Rows - urgent

Sure it can be done, but I have no time now.

I will post back in a few hours (if someonelse does not get in first

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting Specific Rows - urgent

try this
Option Explicit

Sub DeleteSundays()
Application.ScreenUpdating = False
Dim I
I = [a1].End(xlDown).Row - 1
Do
If WeekDay([a1].Offset(I, 0).Value) = vbSunday Then
[a1].Offset(I, 0).EntireRow.Delete
End If
I = I - 1
If I < 0 Then Exit Do
Loop While [a1].Offset(I, 0).Value 0 And I = 0
Application.ScreenUpdating = True
End Su

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting Specific Rows - urgent

getting a VB error in command...
here's where the days start:
A7 all the way A37 are displayed as: 1/1/2004 and so on
B7 to B37 are the week days (monday, tuesday, etc...)

Can you help me revise your code

--
Message posted from http://www.ExcelForum.com

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
Deleting Rows w/ Specific Criteria MCSHMCH Excel Discussion (Misc queries) 2 September 28th 07 01:05 PM
Deleting rows with specific values whatzzup Excel Discussion (Misc queries) 1 July 6th 06 10:35 AM
Deleting Specific Rows ScaffoldingDepot Excel Discussion (Misc queries) 2 May 4th 05 04:08 PM
Deleting specific rows Matt[_20_] Excel Programming 3 November 13th 03 10:41 PM
Deleting rows with specific value from row 1 to 200 solo_razor[_23_] Excel Programming 1 November 4th 03 07:56 AM


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