Hello,
I'm been trying to write a VBA code for the following excel formula:
=IF(AND(A2="Vectrus",Q2="US"),1,IF(AND(A2="Vectrus",Q2<>"US"),2,IF(AND(A2="MSS",Q2="US"),3,IF(AND(A2="MSS",Q2<>"US"),4,IF(AND(A2="Stanley",Q2="US"),5,IF(AND(A2="Dav Force",Q2="US"),6,IF(AND(A2="Dav Force",Q2<>"US"),7,IF(AND(A2="MIGTC",Q2<>"US"),8,IF(AND(A2="KRH",Q2<>"US"),9,10)))))))))
Could some please assist me with writing either a select case or nested IF(And) VBA code. I tried recording a macro typing with code but after I went to run the macro I received a Debug error.