0

I'm starting to study VBA but even searching for the functions needed for this I could not mount the VBA code. I searched for the functions to simulate INDEX and MATCH in VBA, but I could not mount the code correctly.

I have a table to fill where in each cell is the following formula, for example in cell C11:

=IF(INDEX('Sheet1'!$G:$G;MATCH($B11&C$10;'Sheet1'!$B:$B&'Sheet1'!$A:$A;0))<>"";"sm";
IF(INDEX('Sheet1'!$E:$E;MATCH($B11&C$10;'Sheet1'!$B:$B&'Sheet1'!$A:$A;0))<>"";"ok";0))

I would like to transform this formula into a VBA code.

Thanks in advance for the help!

Scott Craner
  • 148,073
  • 10
  • 49
  • 81
  • 3
    Stack Overflow is not a code conversion tool. Please show your attempts to accomplish this. – Scott Craner Jun 13 '19 at 14:57
  • Take a look topic, if you use the `PrintMeUsefulFormula` it should work - https://stackoverflow.com/questions/49363434/excel-vba-formula-german-french-italian-russian-dutch-foreign-function/49363501#49363501 – Vityata Jun 13 '19 at 15:01
  • `answer = sheetVariable.Evaluate(yourFormulaHere)` I don't know if you need to convert your semicolons to commas: typically anything formula-related in VBA uses the US locale separator and language. – Tim Williams Jun 13 '19 at 15:12

0 Answers0