Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
A loop to delete
I have pasted MANY lines of data from a pivot table. The original Pivot
Table had 3 lines of totals between each entry. I want the spreadsheet I am making to have only the entry and not the three lines of totals. So I need to delete these. Going through and manually deleting them takes a long time. I know there is Code for a loop that will repeat a function (I can't get a macro to). Can you help me to get the proper syntax for this. Thank you!! -- Thanks, Nikki |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
A loop to delete
The following code will go through the rows 10 to 1 and check the first
column's cell of each row for a value. If no value exists it will delete the row. Obviously this isn't exactly what you wanted (I have no idea what your data sets look like), but it should be adaptable for your uses. For intCounterA = 10 To 1 Step -1 If Cells(intCounterA, 1).Value = "" Then Rows(intCounterA).EntireRow.Delete End If Next "Nikki" wrote: I have pasted MANY lines of data from a pivot table. The original Pivot Table had 3 lines of totals between each entry. I want the spreadsheet I am making to have only the entry and not the three lines of totals. So I need to delete these. Going through and manually deleting them takes a long time. I know there is Code for a loop that will repeat a function (I can't get a macro to). Can you help me to get the proper syntax for this. Thank you!! -- Thanks, Nikki |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop & Delete | Excel Discussion (Misc queries) | |||
How to Delete Rows in Excel In a Do Loop | Excel Worksheet Functions | |||
Adding a loop to conditional delete code | New Users to Excel | |||
loop to delete rows... | Excel Programming | |||
How do I delete rows and columns in With With End Loop? | Excel Programming |