PDA

View Full Version : Solved: Major issue blank cells



khalid79m
04-07-2009, 03:04 AM
With Range("Talk_Time").SpecialCells(xlCellTypeBlanks)
.NumberFormat = "hh:mm:ss"
End With

My code looks changes the format of all blanks cells in range ("Talk_Time") to HH:MM:SS.

but if there are no blank cells it throws up a debug message cells not found.. ? can anyone help:(

Bob Phillips
04-07-2009, 04:33 AM
On Error Resume Next

Set rng = Range("Talk_Time").SpecialCells(xlCellTypeBlanks)
On Error Goto 0

If Not rng Is Nothing Then rng.NumberFormat = "hh:mm:ss"

khalid79m
04-16-2009, 03:21 AM
thanks mate