I have the following If function in an Excel VBA macro whic looks for the value of a defined variable within a column:
Dim my_acc As String
If IsError(Application.Match(my_acc, cb_range, 0)) Then
cb_mvmt_ind = 0
Else
cb_mvmt_ind = 1
End If
However, the Application.Match function does not recognise cells that do contain the value of "my_acc" if the value is purely numerical. For example it will find "123456-78(GBP)" but will not find "12345678". I have tried declaring the variable "my_acc" as Integer, and have also tried just not declaring the variable at all but to no avail.
Any ideas?
Many thanks
Bookmarks