View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Macro To Change a Formula to A Value

Sub changetoval()
Range("B2:B8").Select 'ADJUST RANGE!
For Each cella In Selection
If cella < 0 Then
cella.Value = cella
End If
Next cella
End Sub

Regards,
Stefi


€˛carl€¯ ezt Ć*rta:

I have a formula in ColB of my worksheet.

The value of the formula will be zero or a positive number.

Is it possible for a macro to change the formula to its value if the value
is not equal to zero ?

Thank you in advance.