Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bluenose
 
Posts: n/a
Default HOW DO I CREATE A MACRO TO STRIP OUT ROWS?

Hi

I have 11 columns of data (A-K). Some of the cells in column J do not
contain data. I need to be able to strip out the rows in which there is no
data in row K and display them seperately on the worksheet or in another
worksheet.

Many thanks
  #2   Report Post  
TomHinkle
 
Posts: n/a
Default

either use the advanced filter functionality (off data menu, see help for how
to use it)
OR sort by column J, delete all rows where J is blank
(generally when I do a sorting/re-ordering macro, I'll add a column called
Order before sorting.. Order is simply a column numbered 1 - x designed to
maintain the original order)

"Bluenose" wrote:

Hi

I have 11 columns of data (A-K). Some of the cells in column J do not
contain data. I need to be able to strip out the rows in which there is no
data in row K and display them seperately on the worksheet or in another
worksheet.

Many thanks

  #3   Report Post  
DNA
 
Posts: n/a
Default

This is the code to add a blank row, just reverese:

Sub InsertRow_At_Change()
Dim i As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i - 1, 1) < Cells(i, 1) Then _
Cells(i, 1).Resize(1, 1).EntireRow.Insert
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub


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
How do I create a macro, that references another excel file ??? Aries Excel Worksheet Functions 1 May 25th 05 11:37 AM
Create a button to continue old macro execution Brian Excel Discussion (Misc queries) 0 May 15th 05 10:22 PM
Activate a macro to insert a row and copy the formuals from the rows above to the blank row oil_driller Excel Discussion (Misc queries) 1 February 11th 05 03:30 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM
Macro to hide rows with empty cells tp58tp Excel Worksheet Functions 2 November 13th 04 02:01 PM


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