Insert a function in an entire column
Select the cells whose formulas you want to modify and run this simple macro:
Sub INT_Only()
' gsnuxx
s1 = "=INT("
s2 = ")"
For Each r In Selection
If IsEmpty(r) Then
Else
v = r.Formula
If Left(v, 1) = "=" Then
v = Right(v, Len(v) - 1)
End If
r.Formula = s1 & v & s2
End If
Next
End Sub
--
Gary''s Student - gsnu200829
"Emece" wrote:
I have a column with many values, and I need to add the int function to the
entire column. I cannot create another column, obtain the int value and
delete the first column because there are several other cells in the workbook
referring to the original column.
Is there a way to insert the function in the column?
Thanks in advance
Regards
Emece
|