View Full Version : Solved: Delete zeros
omnibuster
04-22-2010, 09:08 AM
Hi.
Can this changed ?
ActiveCell.Resize(, 15).SpecialCells(xlCellTypeBlanks).Delete SHIFT:=xlToLeft
to
:think:
ActiveCell.Resize(, 15).Cells(xlCell.VALUE=0).Delete SHIFT:=xlToLeft
lucas
04-22-2010, 09:17 AM
just don't show them:
ActiveWindow.DisplayZeros = False
omnibuster
04-22-2010, 09:36 AM
Thanks lucas, but i wish to make this code shorter.
(Show/hide not that i want)
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
mdmackillop
04-22-2010, 12:08 PM
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
omnibuster
04-22-2010, 02:13 PM
Thanks mdmackillop.
Probably can not say it in one sentence:
ActiveCell.Resize(, 15).Cells(xlCell.VALUE=0).Delete SHIFT:=xlToLeft
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.