I'm trying to build a function to check if an entered client-ID already exists in a list.
I have a macro that uses the value of a cell
The cell contains the function:
{=SUM(--ISNUMBER(FIND(I5,I7:I5000)))}
And checks whether it is 0 (zero) or not. (hence checking if the value (client-ID, e.g. "012345-6789") in Cell I5 is present in Range I7:I5000)
Now, what I want to do is to "move" this into the macro code, so I don't need to have the formula on the sheet.
The VBA code I have now is:
I.e I want to replace the code in bold with the VBA equivalent of the cell function above.
Any thoughts?
I have a macro that uses the value of a cell
The cell contains the function:
{=SUM(--ISNUMBER(FIND(I5,I7:I5000)))}
And checks whether it is 0 (zero) or not. (hence checking if the value (client-ID, e.g. "012345-6789") in Cell I5 is present in Range I7:I5000)
Now, what I want to do is to "move" this into the macro code, so I don't need to have the formula on the sheet.
The VBA code I have now is:
Code:
Dim myCheck As Integer
myCheck [B]= ActiveSheet.Cells(4, 10)[/B]
If myCheck = 0 Then
I.e I want to replace the code in bold with the VBA equivalent of the cell function above.
Any thoughts?
Last edited: