Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have in sheet 2 in column " E " numbers starting at row 3 down to row 1500 , some cells are empty (no numbers , no formulas ) where ever there is an empty cell in column " E " I need to have in the same row the zero deleted in column " G " and the formula deleted in column " L" (both empty nothing in the cell ) If any one can help me , could you let me know how to activate the macro , I'm no good with macros Thanking you all in advance -- bill gras |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bill
I'd start this by saying you don't need a macro, you could in column E apply autofilter (DataAutofilter) and filter on blanks, then highlight column G and L in the filtered data and press the delete key. You could replicate this in a macro or as below, iterate the range and do it that way, for the number of cells you have it shouldn't take to long Sub cleardata() Dim myCell As Range For Each myCell In Worksheets("Sheet2").Range("E3:E1500") If myCell.Value = "" Then myCell.Offset(0, 2).Clear myCell.Offset(0, 7).Clear End If Next myCell End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "bill gras" wrote in message ... Hi I have in sheet 2 in column " E " numbers starting at row 3 down to row 1500 , some cells are empty (no numbers , no formulas ) where ever there is an empty cell in column " E " I need to have in the same row the zero deleted in column " G " and the formula deleted in column " L" (both empty nothing in the cell ) If any one can help me , could you let me know how to activate the macro , I'm no good with macros Thanking you all in advance -- bill gras |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Nick Hodge
You are a gentleman Thank you very much !!! regards bill gras -- bill gras "Nick Hodge" wrote: Bill I'd start this by saying you don't need a macro, you could in column E apply autofilter (DataAutofilter) and filter on blanks, then highlight column G and L in the filtered data and press the delete key. You could replicate this in a macro or as below, iterate the range and do it that way, for the number of cells you have it shouldn't take to long Sub cleardata() Dim myCell As Range For Each myCell In Worksheets("Sheet2").Range("E3:E1500") If myCell.Value = "" Then myCell.Offset(0, 2).Clear myCell.Offset(0, 7).Clear End If Next myCell End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "bill gras" wrote in message ... Hi I have in sheet 2 in column " E " numbers starting at row 3 down to row 1500 , some cells are empty (no numbers , no formulas ) where ever there is an empty cell in column " E " I need to have in the same row the zero deleted in column " G " and the formula deleted in column " L" (both empty nothing in the cell ) If any one can help me , could you let me know how to activate the macro , I'm no good with macros Thanking you all in advance -- bill gras |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to convert numbers and delete leading zeros | Excel Discussion (Misc queries) | |||
How do you delete leading zeros from numbers? | Excel Discussion (Misc queries) | |||
Macro to delete row if row blank but cells do have formulas in the | Excel Programming | |||
Delete leading zeros | Excel Discussion (Misc queries) | |||
Delete zeros in light yellow cells | Excel Programming |