Excel question

  rawsongreen 15:58 04 Mar 2010

After manipulating a very large database with subtotals and sorts I have now a lot of rows with nothing in them. Is it possible to delete these?

  Seth Haniel 16:04 04 Mar 2010

clock on the empty row number -then right click select delete. you can select more rows by holding shift and dragging mouse down over empty rows. remember if you make a mistake you can always - edit -undo

  Seth Haniel 16:07 04 Mar 2010

the final 'sum=' would have to be modified to the new row number

  VoG II 16:08 04 Mar 2010

Try running this macro

Sub DelBl()
Dim LR As Long, i As Long
LR = ActiveSheet.UsedRange.Find(what:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
Application.ScreenUpdating = False
For i = LR To 1 Step -1
If WorksheetFunction.CountA(Rows(i)) = 0 Then Rows(i).Delete
Next i
Application.ScreenUpdating = True
End Sub

  rawsongreen 16:54 04 Mar 2010

Thanks Seth.

Vog can you explain how I run that macro.
Single syllables may be needed!!!!!

  VoG II 17:04 04 Mar 2010

Assuming XL 2003 or earlier...

Press ALT + F11 to open the Visual Basic Editor, select Module from the Insert menu and paste the code into the white space on the right.

Press ALT + Q to return to your sheet, Tools > Macro > Macros, highlight DelBl and click the Run button.

  rawsongreen 17:17 04 Mar 2010

Vog you're a genius!

Many thanks again.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Intel Coffee Lake release date and specifications

12 Amazing British Craft Beer Label Designs

watchOS 4 review

Les meilleurs navigateurs internet 2017