Hello everyone
This function works fine and all references and arguments are typed correctly.
Sub Macro4()
Range("C2").FormulaArray = _
"=IF([@Unique]=1,TEXT([@[Date of Visits]],""dd.mm.yyyy""),""(""&TEXTJOIN("","",,IF(([i.Village]=[@[i.Village]])*([Month]=[@Month])*(MATCH([Date of Visits]&[i.Village],[Date of Visits]&[i.Village],0)=MATCH(ROW([Date of Visits]),ROW([Date of Visits]),0)),TEXT([Date of Visits],""dd""),""""))&"");""&TEXT([@[Date of Visits]],""mm.yyyy""))"
End Sub
But I am trying to register a "VBA code" macro that will automatically type it into cell C2; by open the cell C2 and press (ctrl shift enter), but the developer shows an error when running the code.
Please any help
This function works fine and all references and arguments are typed correctly.
Sub Macro4()
Range("C2").FormulaArray = _
"=IF([@Unique]=1,TEXT([@[Date of Visits]],""dd.mm.yyyy""),""(""&TEXTJOIN("","",,IF(([i.Village]=[@[i.Village]])*([Month]=[@Month])*(MATCH([Date of Visits]&[i.Village],[Date of Visits]&[i.Village],0)=MATCH(ROW([Date of Visits]),ROW([Date of Visits]),0)),TEXT([Date of Visits],""dd""),""""))&"");""&TEXT([@[Date of Visits]],""mm.yyyy""))"
End Sub
But I am trying to register a "VBA code" macro that will automatically type it into cell C2; by open the cell C2 and press (ctrl shift enter), but the developer shows an error when running the code.
Please any help