J
JTF
Hi all
I have the following VB code
Sub ErrorCheck2()
'Error checking for when H1=1
'Error message to display in cell B50
Dim d As Range
If Range("h1") = 1 Then
Range("b50") = ""
For Each d In Range("F19:F38")
If d.Text <> "" And d.Text > "119999" Then
Range("B50") = "ERROR"
Exit Sub
End If
Next
End If
End Sub
I wanted to make this a UDF - but it is not visible when I display the
list of UDF's. This is all new to me, I am learning as I go, and from
what I can see - I need to tell Excel somehow that this is a function
by putting FUNCTION in the code. But I am not sure what syntax I need.
Can someone give me some guidance..(I guess the short question is - I
want to be able to place this macro in a cell as a formula so it will
run automatically). Thanks
I have the following VB code
Sub ErrorCheck2()
'Error checking for when H1=1
'Error message to display in cell B50
Dim d As Range
If Range("h1") = 1 Then
Range("b50") = ""
For Each d In Range("F19:F38")
If d.Text <> "" And d.Text > "119999" Then
Range("B50") = "ERROR"
Exit Sub
End If
Next
End If
End Sub
I wanted to make this a UDF - but it is not visible when I display the
list of UDF's. This is all new to me, I am learning as I go, and from
what I can see - I need to tell Excel somehow that this is a function
by putting FUNCTION in the code. But I am not sure what syntax I need.
Can someone give me some guidance..(I guess the short question is - I
want to be able to place this macro in a cell as a formula so it will
run automatically). Thanks