Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub testEval()
- Dim dataTable As ListObject
- Dim evalStr As Variant
- Dim item1 As String
- Dim item2 As String
- Dim ws As Worksheet
- item1 = "Orange"
- item2 = "Feb"
- Set ws = ActiveSheet
- Set dataTable = ws.ListObjects("myTable")
- With ws
- 'V1
- evalStr = .Evaluate("MATCH(" & item1 & "&" & item2 & "," & .Columns(1).Address & "&" & .Columns(2).Address & "),0)")
- 'V2?
- 'evalStr = .Evaluate("MATCH(" & item1 & "&" & item2 & "," & Application.WorksheetFunction.Substitute(.Columns(1).Address & "&" & .Columns(2).Address, "$", "") & "),0)"
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement