![]() |
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): 081112-0, 11/12/2008 Tested on: 11/13/2008 6:45:32 PM avast! - copyright (c) 1988-2008 ALWIL Software. http://www.avast.com |
Macro for deleting rows and serialising the remaing rows
Sub TaskMan()
Dim n As Long, i As Long n = Cells(Rows.Count, "B").End(xlUp).Row For i = n To 1 Step -1 If Cells(i, "D").Value = "x" Then Rows(i).Delete End If Next n = Cells(Rows.Count, "B").End(xlUp).Row For i = 1 To n Cells(i, "A").Value = i Next End Sub -- Gary''s Student - gsnu200813 "Srinivasulu Bhattaram" wrote: 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): 081112-0, 11/12/2008 Tested on: 11/13/2008 6:45:32 PM avast! - copyright (c) 1988-2008 ALWIL Software. http://www.avast.com |
Macro for deleting rows and serialising the remaing rows
As a rough count this is the fifth time you've posted this and you haven't
responded to any of the people who freely gave their time to explain why the solution they proposed didn't work. Perhaps you should look at those responses. "Srinivasulu Bhattaram" wrote: 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): 081112-0, 11/12/2008 Tested on: 11/13/2008 6:45:32 PM avast! - copyright (c) 1988-2008 ALWIL Software. http://www.avast.com |
All times are GMT +1. The time now is 08:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com