Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete a row in excel if it has no value?
I work a lot in spreadsheets that are linked together. Eg I enter data on
one sheet it is recalculated and placed on another spreadsheet that has multiple rows of data on it. I then delete the lines that have no data from previous sheet on it to print a neater form. Can I somehow get these rows that have a zero valu in a certain column not show up when I print instead of manually deleting them one by one. Thank You for any help you may be able to give me. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete a row in excel if it has no value?
insert this code in a module you can make a button and assign the macro to the button when you highlite a range, run the macro and it will delete the empty rows Sub DeleteBlankRows1() 'Deletes the entire row within the selection if the ENTIRE row contains no data. 'We use Long in case they have over 32,767 rows selected. Dim i As Long 'We turn off calculation and screenupdating to speed up the macro. With Application .Calculation = xlCalculationManual .ScreenUpdating = False 'We work backwards because we are deleting rows. For i = Selection.Rows.Count To 1 Step -1 If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then Selection.Rows(i).EntireRow.Delete End If Next i .Calculation = xlCalculationAutomatic .ScreenUpdating = True End With End Sub -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=518008 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete a row in excel if it has no value?
This sounds like a good place for using auto filter
select a column which would be blank for the rows you would not want to show when printing. Select non blank from the auto filter options. "CarSum" wrote: I work a lot in spreadsheets that are linked together. Eg I enter data on one sheet it is recalculated and placed on another spreadsheet that has multiple rows of data on it. I then delete the lines that have no data from previous sheet on it to print a neater form. Can I somehow get these rows that have a zero valu in a certain column not show up when I print instead of manually deleting them one by one. Thank You for any help you may be able to give me. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to delete multiple autoshape or objects in excel | Excel Discussion (Misc queries) | |||
delete multiple autoshapes or objects in excel | Excel Discussion (Misc queries) | |||
Delete excel spreadsheets within excel | Excel Discussion (Misc queries) | |||
I WANT TO DELETE A WIDE OF DATE IN A EXCEL FILE | Excel Discussion (Misc queries) | |||
How can we delete rows permanently from excel sheet | Excel Discussion (Misc queries) |