E
excelnut1954
Background: Our PO system has a leading letter (M), then 6 digits. When
an order is changed, it is given a letter at the end each time. So, you
can start with a PO number M123456. If the order is changed, it
becomes M123456A If it is changed again, it becomes M1234156B. It
will be replaced with the next letter each time the order is changed.
The list I will be setting up search macros for will have PO number
that might, or might not have these trailing letters. I know the Find
feature will except wildcards, since I just tried it. But, as far as in
a macro, I don't know how to allow the wildcard.
Here's code for searches in another macro I have. The value
FindPOVal is created when the user enters the PO number in a textbox. I
tried putting FindPOVal*, and tried it with "", with no success.
I only want the wildcard at the end of the value. Can anyone help?
Thanks,
J.O.
Set rngToSearch = Sheets("Official List").Columns("J")
Set rngFound = rngToSearch.Find(What:=FindPOVal, _
LookIn:=xlValues, _
LookAt:=xlWhole)
an order is changed, it is given a letter at the end each time. So, you
can start with a PO number M123456. If the order is changed, it
becomes M123456A If it is changed again, it becomes M1234156B. It
will be replaced with the next letter each time the order is changed.
The list I will be setting up search macros for will have PO number
that might, or might not have these trailing letters. I know the Find
feature will except wildcards, since I just tried it. But, as far as in
a macro, I don't know how to allow the wildcard.
Here's code for searches in another macro I have. The value
FindPOVal is created when the user enters the PO number in a textbox. I
tried putting FindPOVal*, and tried it with "", with no success.
I only want the wildcard at the end of the value. Can anyone help?
Thanks,
J.O.
Set rngToSearch = Sheets("Official List").Columns("J")
Set rngFound = rngToSearch.Find(What:=FindPOVal, _
LookIn:=xlValues, _
LookAt:=xlWhole)