Hello, I am new to programming in VBA, and I am attempting to create a macro that will do the following:
Sheet1 Column "A" contains text strings
Sheet2 Column "A" contains text strings
I would like to get Sheet2 Column A, Row 1 and search for the string in Sheet1 Column A. The problem is the text in Sheet1 is not always an exact match. For example:
Sheet1 A,23: R12345
Sheet2 A,1: 12345
If the macro works how I would like, it should identify Sheet1 A,23 as a match.
I have tried using:
But get the following error when running the macro:
Any assistance would be great! As I stated, I have only been playing around with this for a short time (like about 2 days).
Regards,
Charles
Sheet1 Column "A" contains text strings
Sheet2 Column "A" contains text strings
I would like to get Sheet2 Column A, Row 1 and search for the string in Sheet1 Column A. The problem is the text in Sheet1 is not always an exact match. For example:
Sheet1 A,23: R12345
Sheet2 A,1: 12345
If the macro works how I would like, it should identify Sheet1 A,23 as a match.
I have tried using:
Code:
If Not (IsError(Application.WorksheetFunction.Search(OrderPart, MasterPart))) Then
Found = True
Worksheets(MasterSheetName).Range("B" & j).Value = OrderNumber
End If
Run-time error '1004':
Unable to get the Search property of the WorksheetFunction class.
Any assistance would be great! As I stated, I have only been playing around with this for a short time (like about 2 days).
Regards,
Charles