Hi
I do not know how to use macro. I am tired to delete the blank rows manually each month.
Please make my days easier if you know how I can go about remove the blank rows on the attached file. I have used F5 but it is not friendly
If I have to use macro - can you give me the baby step-by-step and the codes pls
Thank you all!![]()
Please post in the correct forum in the future. I will move it for you this time.
Please have a look at our forum rules.
Quoting entire posts clutters the forum and makes threads hard to read !
If you are pleased with a member's answer then use the Star icon to rate it
Click here to see forum rules
Put this code in a normal code module:
Sub Macro1() Cells.AutoFilter With ActiveSheet.Range("$A$1:$E$15248") .AutoFilter Field:=1, Criteria1:="=" .AutoFilter Field:=5, Criteria1:="=" .Offset(1, 0).EntireRow.Delete End With Cells.AutoFilter End Sub
Regards
Am so sorry.. I have never used macros before.. how do I go about using the code you provided?
can I email you the file to help?
I have placed the macro in your sample file. It is named Macro1
Here are instructions for running it:
http://spreadsheets.about.com/od/adv...el_macro_5.htm
@Cutter: thanks
You're welcome. I did it because your green light was out.
I would replace
withWith ActiveSheet.Range("$A$1:$E$15248")
Also, add Application.ScreenUpdating = False at the beginning of the code and Application.ScreenUpdating = True at the end.With ActiveSheet.Range("$A$1", Range("A" & Rows.Count).End(xlUp).Offset(, 4))
The code would look like this
Not nitpicking, just observing.Sub Macro1() Application.ScreenUpdating = False Cells.AutoFilter With ActiveSheet.Range("$A$1", Range("A" & Rows.Count).End(xlUp).Offset(, 4)) .AutoFilter Field:=1, Criteria1:="=" .AutoFilter Field:=5, Criteria1:="=" .Offset(1, 0).EntireRow.Delete End With Cells.AutoFilter Application.ScreenUpdating = True End Sub
John
@jolivanes: fair observation ... perhaps being just a little bit lazy, although I did tidy up the recorded macro
Might be that "lazy" is the wrong word.
You could be busy and I have time on hand.
Hi
Thank you for all the help. I am still stuck
I do get the following error message
RUN-TIME ERROR '1004'
AUTOFILTER METHOD OF RANGE CLASS FAILED
Can I email the file am working on to someone who can help.. please
Is the worksheet protected?
How different is the real file from the sample you have posted?
Regards
no its is not protected
Does this attached workbook work on your computer?
Last edited by jolivanes; 03-07-2011 at 05:09 PM. Reason: fix spelling
I am about to give up... i try to attach the whole file but the MB on myfile wont allow me
if one can help pls.. let me email u
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks