Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
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
Loop & Delete Jenna Excel Discussion (Misc queries) 3 January 24th 07 06:34 PM
How to Delete Rows in Excel In a Do Loop indraneel Excel Worksheet Functions 6 September 15th 06 09:51 AM
Adding a loop to conditional delete code maw via OfficeKB.com New Users to Excel 21 August 15th 06 04:11 PM
loop to delete rows... Froglegz Excel Programming 5 August 1st 04 09:56 PM
How do I delete rows and columns in With With End Loop? Bob Benjamin Excel Programming 3 November 16th 03 12:26 AM


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