Mattandy55
New Member
- Joined
- May 27, 2016
- Messages
- 20
Hello,
I have the following code:
Sheets("Report").Select
Range("M1").FormulaR1C1 = "=COUNTA(C[-10])+3"
Range("M5:M" & Range("M1").Value).FormulaR1C1 = "=IF(COUNTIF([@Type],""*Bonus*""),""Yes"",""No"")"
Range("N5:N" & Range("M1").Value).FormulaR1C1 = "=IF(COUNTIF([@Type],""*Catch*""),""Yes"",""No"")"
Range("O5:O" & Range("M1").Value).FormulaR1C1 = "=IF(OR([@Column1]=""yes"",[@Column2]=""yes""),""Yes"",""No"")"
It runs the first 2 lines fine and then once it gets to the Range("N5:N") line it throws the Application-Defined or Object Defined Error. Any idea how to clean up this code or how to get around this error?
Thanks
I have the following code:
Sheets("Report").Select
Range("M1").FormulaR1C1 = "=COUNTA(C[-10])+3"
Range("M5:M" & Range("M1").Value).FormulaR1C1 = "=IF(COUNTIF([@Type],""*Bonus*""),""Yes"",""No"")"
Range("N5:N" & Range("M1").Value).FormulaR1C1 = "=IF(COUNTIF([@Type],""*Catch*""),""Yes"",""No"")"
Range("O5:O" & Range("M1").Value).FormulaR1C1 = "=IF(OR([@Column1]=""yes"",[@Column2]=""yes""),""Yes"",""No"")"
It runs the first 2 lines fine and then once it gets to the Range("N5:N") line it throws the Application-Defined or Object Defined Error. Any idea how to clean up this code or how to get around this error?
Thanks