A
alan.phillipson
Hi, I have the following UDF and I wish to put this in column 3 of a
sheet for a 100 rows, but I can't get it to work. Any ideas?
Function quizzer(txt As String)
With CreateObject("VBScript.RegExp")
.Pattern = "([a-zA-Z]+\.)?\d+"
quizzer = .Execute(txt)(0)
End With
End Function
I have tried the following, but I can not get the cell reference to
change.
Sub test()
For x = 1 To 100
r = Range("c65536").End(xlUp).Row + 1
frml = "A" & r
Cells(r, 3).Formula = "=quizzer(frml)"
r = r + 1
Next x
End Sub
sheet for a 100 rows, but I can't get it to work. Any ideas?
Function quizzer(txt As String)
With CreateObject("VBScript.RegExp")
.Pattern = "([a-zA-Z]+\.)?\d+"
quizzer = .Execute(txt)(0)
End With
End Function
I have tried the following, but I can not get the cell reference to
change.
Sub test()
For x = 1 To 100
r = Range("c65536").End(xlUp).Row + 1
frml = "A" & r
Cells(r, 3).Formula = "=quizzer(frml)"
r = r + 1
Next x
End Sub