1
I have a spreadsheet with several tabs. In the first tab I have the following table:
In tab 2 type the client and the type, and I wish to return the ID.
For this I am using the following code in VBA:
tipo = ActiveCell.Offset(0, -1).Value
cliente = Range("D5").Value
ActiveCell.Offset(0, -2) = WorksheetFunction.Index(Sheets("Aba 1").[Tabela1[ID]], WorksheetFunction.Match(cliente & tipo, Sheets("Aba 1").[Tabela1[CLIENTE]] & Sheets("Aba 1").[Tabela1[TIPO]], 0))
I’m not getting the value back. I tried several ways, even using EVALUATE or dividing the function by parts but could not get the expected result.
How should I do?