• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Issue while converting Index/match, IFERROR excel formula into VBA

Status
Not open for further replies.

Manjeet Singh

New Member
I have a excel formula which is working fine in excel manually however when I have tried to convert in to macro, it is not working. Can anyone please help me in converting the same. I am bit new to coding world and learning now.

Excel formula :
{=IFERROR(INDEX('[NAL for Macro.xlsb]Sheet1'!$M:$M,MATCH(1,('[NAL for Macro.xlsb]Sheet1'!$H:$H=G2)*(LEFT('[NAL for Macro.xlsb]Sheet1'!$C:$C,15)=LEFT(B2,15)),0)),IFERROR(VLOOKUP(G2,'[NAL for Macro.xlsb]Sheet1'!$H:$O,6,0),IFERROR(VLOOKUP(G2,'[NAL for Macro.xlsb]Sheet1'!$I:$O,5,0),(VLOOKUP(LEFT(B2,15)&"*",'[NAL for Macro.xlsb]Sheet1'!$C:$O,11,0)))))}

below is macro

Selection.FormulaArray = _
"=IFERROR(INDEX('[NAL for Macro.xlsb]Sheet1'!C13,MATCH(1,('[NAL for Macro.xlsb]Sheet1'!C8=RC[-8])*(LEFT('[NAL for Macro.xlsb]Sheet1'!C3,15)=LEFT(RC[-13],15)),0)),IFERROR(VLOOKUP(RC[-8],'[NAL for Macro.xlsb]Sheet1'!C8:C15,6,0),IFERROR(VLOOKUP(RC[-8],'[NAL for Macro.xlsb]Sheet1'!C9:C15,5,0),(VLOOKUP(LEFT(RC[-13],15)&""*"",'[NAL for Macro.xlsb]Sheet1'!C3:C15,11,0)))))"
End Sub
 
Status
Not open for further replies.
Back
Top