Remove a Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have the following problem. I have prepared, where I have been using the
function ROUND in many cells. Now I have to remove this function but I don't
see an easy way for doing it.

Now I have: =RUNDEN(('Daten'!F9);1)

And I would like having: 'Daten'!F9

Can anybody help me? I see no other option than removing this funtion
manually...

Best regards,

núria.
 
Select the cells you want to change and run:

Sub noround()
For Each r In Selection
s = Split(r.Formula, "(")
t = Split(s(2), ")")
r.Formula = "=" & t(0)
Next
End Sub
 
Hi Gary,

Thank you very much for your fast answer, but could you be a little bit more
exactly with your explanation?
Does that mean I have to create a Macro? What is "Formula"? (I am using a
German version, so I guess I will have to replace it through "Formeln")

Best regards,

núria.
 
Hi núria,

Here's a macro to do the job, on the assumption that you don't have the RUNDEN function embedded in a more complicated formula:

Sub Clear_RUNDEN()
Dim oCell As Range
With ActiveSheet
For Each oCell In .UsedRange.SpecialCells(xlCellTypeFormulas)
If InStr(oCell.Formula, "RUNDEN((Daten!") Then
oCell.Value = "=" & Mid(oCell.Formula, Len("=RUNDEN((") + 1, Len(oCell.Formula) - Len("=RUNDEN((") - 4)
End If
Next
End With
End Sub

Cheers
 
Back
Top