#1
|
|||
|
|||
delete row
Hi All,
I would like to delete more than one row(which columnA cells contain nothing ) in between rows that is as follows.that is allow only one row(like row3 after vba progamme) in between for spacing or no row in between(like row1 and2) How to write the VBA code many thanks ColumnA ColumnB Row1 Peter Math Mark=100 Row2 John Math Mark=99 Row3 Row4 Row5 tom math mark=68 row6 row7 row8 mary math mark=50 After we use VBA progamme , the result as follows ColumnA ColumnB Row1 Peter Math Mark=100 Row2 John Math Mark=99 Row3 Row4 tom math mark=68 row5 row6 mary math mark=50 Thanks Tomlam Last edited by tomlam; 10-02-2012 at 06:33 PM. |
#2
|
||||
|
||||
What is the vba code you are using?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
excel vba code we are using. thanks
|
#4
|
||||
|
||||
Please post the code you are using. Telling me it's Excel vba (which is pretty obvious in an Excel programming forum) doesn't really add much to what you've already posted.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
that is part of the excel vba programe,
Code:
lastRow = Cells(Rows.Count, 1).End(xlUp).Row For Z = 2 To lastRow If (Cells(Z, ("f"))) = "" Then Cells(Z, ("f")).EntireRow.Clear Next Z my request as previous enquiry Thanks Macropod Last edited by macropod; 10-04-2012 at 11:50 PM. Reason: Added code tags & formatting |
#6
|
||||
|
||||
Try:
Code:
lastRow = Cells(Rows.Count, 1).End(xlUp).Row For Z = lastRow to 2 Step -1 If Cells(Z, 4) = "" Then Cells(Z, 4).EntireRow.Delete Next Z PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Thanks Paul. My programme is complete. Thank so much for your great help
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delete Space | mariadanmark | Excel | 2 | 05-17-2012 02:53 AM |
cannot delete these lines! | userman | Word | 4 | 05-02-2012 12:34 AM |
Delete option greyed out when trying to delete row 1 | tpcervelo | Excel | 2 | 11-15-2011 06:48 AM |
Cannot delete folders | klingenfelter | Outlook | 10 | 02-04-2011 01:35 PM |
delete email message via blackberry and have it delete on my pop3 and my outlook | Iamthestorm | Outlook | 2 | 10-28-2010 12:21 AM |