Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 5
Default Macro for deleting rows and serialising the remaing rows

Macro for deleting rows and serialising the remaing rows
================================================== ==

I have a spread sheet

It's a ToDo List



The structure is like this

Column A Sl No

Column B Task

Column C Person

Column D Completed



To start with I keep entering the tasks in one stretch and take a print out.

The first Column (A) will be a serialized.

I wil be using this print out for few days.

After two/three days, I would like to open the spread sheet and enter fresh
tasks

For all completed tasks I put x in Col D.

What I currently require is a macro to



1.. Remove all rows where Column D contains 'x" (quotes not included.)
2.. After this operation, contents of Column A will have to be serialsed.


seena




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 081111-0, 11/11/2008
Tested on: 11/12/2008 5:59:36 PM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



  #2   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 473
Default Macro for deleting rows and serialising the remaing rows

Not sure why you chose the Links group for this post - Programming
would be more appropriate, but anyway your macro would be something
like this:

Sub CleanUp()
' assumes the data starts at A1 and has titles in row 1
Dim lRow As Long
With Range("A1").CurrentRegion
For lRow = .Rows.Count To 2 Step -1
If .Cells(lRow, 4)="x" then .Rows(lRow).Delete shift:=xlUp
Next
.Sort key1:=Range("A1"), order1:=xlAscending, header:=xlYes
End With
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 07:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 02:39 PM
Deleting rows with macro PhilScratchingmyhead Excel Worksheet Functions 2 June 29th 06 05:55 PM
Macro deleting specified rows Snoopy Charts and Charting in Excel 0 February 15th 06 01:56 PM
Deleting rows in a macro in Excel THEFALLGUY Excel Discussion (Misc queries) 4 December 23rd 05 02:59 PM


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