Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
Hi, I am after a piece of code that will delete all empty rows downwards from
1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
Autofilter column B for blanks, then delete all visible rows.
HTH Bob "JohnUK" wrote in message ... Hi, I am after a piece of code that will delete all empty rows downwards from 1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
Hi Bob, Thanks for help, but its not as simple as that. There is a lot of
manipulation of data that gets copied from one tab to another, gets sorted, has rows inserted between certain data, then back. Can the rows not be deleted through code then? "Bob Phillips" wrote: Autofilter column B for blanks, then delete all visible rows. HTH Bob "JohnUK" wrote in message ... Hi, I am after a piece of code that will delete all empty rows downwards from 1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
Blanks in column B down to say B7?
Sub delete_blank_rows() Range(Cells(1, 2), Cells(1, 2).End(xlDown).Offset(-1)) _ .EntireRow.Delete End Sub Gord Dibben MS Excel MVP On Sat, 6 Feb 2010 05:46:01 -0800, JohnUK wrote: Hi, I am after a piece of code that will delete all empty rows downwards from 1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
Fantastic, just what I wanted.
Many thanks Gord Regards John "Gord Dibben" wrote: Blanks in column B down to say B7? Sub delete_blank_rows() Range(Cells(1, 2), Cells(1, 2).End(xlDown).Offset(-1)) _ .EntireRow.Delete End Sub Gord Dibben MS Excel MVP On Sat, 6 Feb 2010 05:46:01 -0800, JohnUK wrote: Hi, I am after a piece of code that will delete all empty rows downwards from 1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
It can. Another way
With Activesheet LastRow = .Cells(Rows.Count, "B").End(xlUp).Row .Range("B1").Resize(LastRow).SpecialCells(xlCellTy peBlanks).Entirerow.Delete End With HTH Bob "JohnUK" wrote in message ... Hi Bob, Thanks for help, but it's not as simple as that. There is a lot of manipulation of data that gets copied from one tab to another, gets sorted, has rows inserted between certain data, then back. Can the rows not be deleted through code then? "Bob Phillips" wrote: Autofilter column B for blanks, then delete all visible rows. HTH Bob "JohnUK" wrote in message ... Hi, I am after a piece of code that will delete all empty rows downwards from 1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Rows
On 2/6/2010 8:46 AM, JohnUK wrote:
Hi, I am after a piece of code that will delete all empty rows downwards from 1st row until it hits data in column B. I can see plenty of threads explaining how to delete upwards until it hits data, but not downwards. Help greatly appreciated Just another slight variation: Sub Demo() With [B:B] 'Column If .Cells(1) = vbNullString Then .SpecialCells(xlCellTypeBlanks).Areas(1).EntireRow .Delete End If End With End Sub = = = = = = = HTH :) Dana DeLouis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete & Merge Columns,Delete Rows with filter, etc | Excel Programming | |||
Delete Rows if any cell in Column H is blank but do not Delete Fir | Excel Programming | |||
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows | Excel Programming | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |