Help with creating a macro for my formula

Hi, I need a macro that will utilize the below formula for column D(Starting at D3), range = # of rows that have data in column A. Thank you for any help you can provide, I have been trying to get this for quite some time!

=IFERROR(IF(C3<>"",IF(AND(VLOOKUP(A3,$H$2:$I$413,2,0)="Assigned Attorney",OR(B3="Jimmy Edwards",B3="Kathleen McCarthy")),"Sales Team",IF(AND(VLOOKUP(A3,$H$2:$I$413,2,0)="Intake Team, Assigned Attorney, or Sales Team",B3<>"Jimmy Edwards",B3<>"Kathleen McCarthy"),B3,IF(AND(VLOOKUP(A3,$H$2:$I$413,2,0)="Intake Team, Assigned Attorney, or Sales Team",OR(B3="Jimmy Edwards",B3="Kathleen McCarthy")),"Sales Team",IF(VLOOKUP(F3,$P$2:$Q$363,2,0)="Assigned Attorney",B3,IF(AND(VLOOKUP(A3,$H$2:$I$413,2,0)="Sales Team",OR(B3="Jimmy Edwards",B3="Kathleen McCarthy")),"Sales Team",IF(C3<>"",VLOOKUP(A3,$H$2:$I$413,2,0),"Intake Team")))))),"No Match"),"")