Hi.
Can this changed ?
[VBA]
ActiveCell.Resize(, 15).SpecialCells(xlCellTypeBlanks).Delete SHIFT:=xlToLeft
[/VBA]
to
[VBA]
ActiveCell.Resize(, 15).Cells(xlCell.VALUE=0).Delete SHIFT:=xlToLeft
[/VBA]
Hi.
Can this changed ?
[VBA]
ActiveCell.Resize(, 15).SpecialCells(xlCellTypeBlanks).Delete SHIFT:=xlToLeft
[/VBA]
to
[VBA]
ActiveCell.Resize(, 15).Cells(xlCell.VALUE=0).Delete SHIFT:=xlToLeft
[/VBA]
just don't show them:
[VBA]ActiveWindow.DisplayZeros = False[/VBA]
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
Thanks lucas, but i wish to make this code shorter.
(Show/hide not that i want)
[vba] Range("A23").Select
ActiveCell.Resize(, 15).Select
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveCell.Resize(, 15).SpecialCells(xlCellTypeBlanks).Delete SHIFT:=xlToLeft
Range("A23").Activate[/vba]
[VBA] With Range("A23").Resize(, 15)
.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
.SpecialCells(xlCellTypeBlanks).Delete SHIFT:=xlToLeft
End With[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Thanks mdmackillop.
Probably can not say it in one sentence:
ActiveCell.Resize(, 15).Cells(xlCell.VALUE=0).Delete SHIFT:=xlToLeft