Run time error 13 Type mismatch in VBA

  • One of the VBA sentence in my existing code is


    Code
    Dim lngRows As Long 
    Cells(lngRows, "Q").FormulaR1C1 = _
    "=(IF(RC[-15]=""JOHN"",""JN"",IF(RC[-15]=""QUEEN"",""QN"",IF(RC[-15]=""KINGDOM"",""KG"",""""))))&LEFT(RC[-12],1)&RC[-13]&TEXT(RC[-14],""DD"")&UPPER(LEFT(TEXT(RC[-14],""MMM""),2))&TEXT(RC[-14],""YY"")"


    while executing the Macro, i get error 13 Type mismatch




    What i need to change, so that, i dont get error, and it gets executed.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!