Dim myArray() As Variant Dim NumText As String Dim DecPos As Integer Dim i as long i = 0 ReDim myArray(Selection.Count) For Each cel In Selection myArray(i) = cel.Value i = i + 1 Next For i = LBound(myArray) To UBound(myArray) NumText = myArray(i) DecPos = InStr(1, NumText, ".") If DecPos > 0 Then If InStr(1, (Right(NumText, Len(NumText) - DecPos)), ".") > 0 Then NumText = Replace(NumText, ".", "", Start:=DecPos + 1) End If End If
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.