View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Is there any method to remove...

The code works exactly as designed.

Not False = True, and the cell.Formula = Cell.Value is executed whenever the
cell does not have a formula - exactly as designed.

Sub Tester9()
Dim cell As Range
For Each cell In Selection
If Not cell.HasFormula Then
cell.Formula = cell.Value
End If
Next

End Sub

Maybe you tested with your own version and neglected the NOT statement.

Did I miss something? I am using Win2000 & Excel 2000

Apparently

--
Regards,
Tom Ogilvy

"AA2e72E" wrote in message
...
I had a similar problem i.e. numbers with prefix ' causing the column to

be left aligned.

cell.HasFormula for such cells returns FALSE. Therefore, although

cell.Value does remove the ', it is never executed.
Did I miss something? I am using Win2000 & Excel 2000