I've looked over some posts here related to my issue, but can't seem to get this to work.
I want to use Index/Match using VBA to find a specific cell value in a named range.
The code above does not find the value I'm looking for, but if I change it to this, it will work:
My columns must be dynamic to capture the data as it changes. What am I missing?
I want to use Index/Match using VBA to find a specific cell value in a named range.
VBA Code:
Dim myDistro As String
Dim myID As Integer
myDistro = Application.WorksheetFunction.Index(Worksheets("PS Console - Data").ListObjects("tblPSConsoleRAW").ListColumns("Distribution List"), Application.WorksheetFunction.Match(myID, Worksheets("PS Console - Data").ListObjects("tblPSConsoleRAW").ListColumns("ID"), 0))
The code above does not find the value I'm looking for, but if I change it to this, it will work:
VBA Code:
myDistro = Application.WorksheetFunction.Index(Worksheets("PS Console - Data").Range("AR3:AR47"), Application.WorksheetFunction.Match(myID, Worksheets("PS Console - Data").Range("C3:C47"), 0))
My columns must be dynamic to capture the data as it changes. What am I missing?