jordanburch
Active Member
- Joined
- Jun 10, 2016
- Messages
- 440
- Office Version
- 2016
Hey guys
I have the below. It is erroring out on the second statement. I suspect a quote is in the wrong spot. Can someone please help? ALso, can someone explain to me when to use "" and """ and & when using variables within formulas? it doesnt make sense to me.
Jordan
ActiveCell.FormulaR1C1 = _
"=+IF(AND(RC[-7]=""=CO21army" & Left(ThisWorkbook.Worksheets("Variables").Range("a2").Value, 3) & _
Right(ThisWorkbook.Worksheets("Variables").Range("A3").Value, 2) & ".xlsx"",OR(RC[-12]="" _
& right(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 2) & "/" & left(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 4)", RC[-12]="" & right(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 1) & "/" & left(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 4)"")),""X"","" "")"
", RC[-12]="" & right(ThisWorkbook.Worksheets("
I have the below. It is erroring out on the second statement. I suspect a quote is in the wrong spot. Can someone please help? ALso, can someone explain to me when to use "" and """ and & when using variables within formulas? it doesnt make sense to me.
Jordan
ActiveCell.FormulaR1C1 = _
"=+IF(AND(RC[-7]=""=CO21army" & Left(ThisWorkbook.Worksheets("Variables").Range("a2").Value, 3) & _
Right(ThisWorkbook.Worksheets("Variables").Range("A3").Value, 2) & ".xlsx"",OR(RC[-12]="" _
& right(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 2) & "/" & left(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 4)", RC[-12]="" & right(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 1) & "/" & left(ThisWorkbook.Worksheets("Variables").Range("a6").Value, 4)"")),""X"","" "")"
", RC[-12]="" & right(ThisWorkbook.Worksheets("