Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macros
Dear Sir
How can I make a macro which will delete all the Blank rows from a data before pasting it in Excel |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macros
Sub Test()
Dim iLastRow As Long Dim i As Long Dim rng As Range iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To iLastRow If Application.CountA(Rows(i)) = 0 Then If rng Is Nothing Then Set rng = Rows(i) Else Set rng = Union(rng, Rows(i)) End If End If Next i If Not rng Is Nothing Then rng.Delete End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Nimesh Shastri" <Nimesh wrote in message ... Dear Sir How can I make a macro which will delete all the Blank rows from a data before pasting it in Excel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
calling a series macros with a marco | Excel Discussion (Misc queries) | |||
Macros, How do I know what they do if I didn't create them. | Excel Discussion (Misc queries) | |||
Remove macros from spreadsheet | Excel Discussion (Misc queries) | |||
Enabling macros | Excel Discussion (Misc queries) | |||
Transferring toolbars and macros to other computers | Excel Discussion (Misc queries) |