Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
empty a entire row
I have formulas in cells in column "C" and when a formula returns a "0" (zero)
I need to empty (not delete) that entire row or rows what ever the case may be, from column "C,D,E,F" ect. on wards as far as it will go. I need to have the rows in columns "A,B" untouched) there are 8000 rows Can some one help me please Thanks regards bill -- bill gras |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
empty a entire row
Here is some code for you. Right click on the appropriate sheet tab and
select view code. Paste this in the code window and you should be good to go... Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ErrorHandler With Target If .Column = 3 And .Value = 0 Then Application.EnableEvents = False Range(.Offset(0, 1), .Offset(0, Columns.Count - 3)).ClearContents End If End With ErrorHandler: Application.EnableEvents = True End Sub -- HTH... Jim Thomlinson "bill gras" wrote: I have formulas in cells in column "C" and when a formula returns a "0" (zero) I need to empty (not delete) that entire row or rows what ever the case may be, from column "C,D,E,F" ect. on wards as far as it will go. I need to have the rows in columns "A,B" untouched) there are 8000 rows Can some one help me please Thanks regards bill -- bill gras |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
empty a entire row
Hi Jim
Thank you for your reply and the explanation how to apply the code Thanks again regards bill -- bill gras "Jim Thomlinson" wrote: Here is some code for you. Right click on the appropriate sheet tab and select view code. Paste this in the code window and you should be good to go... Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ErrorHandler With Target If .Column = 3 And .Value = 0 Then Application.EnableEvents = False Range(.Offset(0, 1), .Offset(0, Columns.Count - 3)).ClearContents End If End With ErrorHandler: Application.EnableEvents = True End Sub -- HTH... Jim Thomlinson "bill gras" wrote: I have formulas in cells in column "C" and when a formula returns a "0" (zero) I need to empty (not delete) that entire row or rows what ever the case may be, from column "C,D,E,F" ect. on wards as far as it will go. I need to have the rows in columns "A,B" untouched) there are 8000 rows Can some one help me please Thanks regards bill -- bill gras |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
empty a entire row
Hi Jim
I have enterd the macro as you adviced , but nothing happend when I ran the macro regards bill -- bill gras "Jim Thomlinson" wrote: Here is some code for you. Right click on the appropriate sheet tab and select view code. Paste this in the code window and you should be good to go... Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ErrorHandler With Target If .Column = 3 And .Value = 0 Then Application.EnableEvents = False Range(.Offset(0, 1), .Offset(0, Columns.Count - 3)).ClearContents End If End With ErrorHandler: Application.EnableEvents = True End Sub -- HTH... Jim Thomlinson "bill gras" wrote: I have formulas in cells in column "C" and when a formula returns a "0" (zero) I need to empty (not delete) that entire row or rows what ever the case may be, from column "C,D,E,F" ect. on wards as far as it will go. I need to have the rows in columns "A,B" untouched) there are 8000 rows Can some one help me please Thanks regards bill -- bill gras |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to SUM entire column, but only when adjacent cell is not empty | Excel Worksheet Functions | |||
Is there a test to see if an entire row or column is empty? | Excel Programming | |||
Change Empty Cells Font for the Entire Workbook | Excel Programming | |||
Delete entire row if A1,2,3... is empty | Excel Programming | |||
Is entire row empty? | Excel Programming |