Thread: Help Please
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Help Please

Sub divideval()
Dim V As Double
Set r = Range("B2:H88")
V = 41
For Each rr In r
If rr.HasFormula Or IsEmpty(rr) Then
Else
rr.Value = rr.Value / V
End If
Next
End Sub

Will divide each value by 41, but will leave the formulas alone.
--
Gary''s Student - gsnu200739


"shaji" wrote:

I have a range of data from B2:H88 which contains formulas also. I want to
devide the cell values in the range with 41. Is there any way to edit the
all cells in the range in one go to devide it with 41 other than individually
edit each cell. If it can be done with a macro please provide.

regards