Hello people. This is quick and easy I just can't figure out the correct syntax. Help appreciated.
I'm attempting to create an Excel macro that replaces cell contents on one sheet with a connecting formula to update it from another sheet. I am currently using very uneffective code, and it has worked, but I have recently encountered a few problems. More effective code would be much easier to manage.
Currently I am using the following:
Range("A2").Sel ect
ActiveCell.Form ulaR1C1 = "='\\Rao_feed2\ Loss Graphs\[Loss Report.xls]BREAKERS'!R17C1 57"
Range("A3").Sel ect
ActiveCell.Form ulaR1C1 = "='\\Rao_feed2\ Loss Graphs\[Loss Report.xls]BREAKERS'!R17C1 53"
Range("A4").Sel ect
ActiveCell.Form ulaR1C1 = "='\\Rao_feed2\ Loss Graphs\[Loss Report.xls]BREAKERS'!R17C1 49"
As you may notice the cells skip in intervals of 4. C157 - C153 - C149 etc. I'm thinking of trying to create a For 157 To 149 statement, but I don't know how to make it skip by 4's, only in numerical order. If anyone knows the syntax to make this transition it would be much appreciated. If I can make it skip by 4 I think I can figure the rest out.
I'm attempting to create an Excel macro that replaces cell contents on one sheet with a connecting formula to update it from another sheet. I am currently using very uneffective code, and it has worked, but I have recently encountered a few problems. More effective code would be much easier to manage.
Currently I am using the following:
Range("A2").Sel ect
ActiveCell.Form ulaR1C1 = "='\\Rao_feed2\ Loss Graphs\[Loss Report.xls]BREAKERS'!R17C1 57"
Range("A3").Sel ect
ActiveCell.Form ulaR1C1 = "='\\Rao_feed2\ Loss Graphs\[Loss Report.xls]BREAKERS'!R17C1 53"
Range("A4").Sel ect
ActiveCell.Form ulaR1C1 = "='\\Rao_feed2\ Loss Graphs\[Loss Report.xls]BREAKERS'!R17C1 49"
As you may notice the cells skip in intervals of 4. C157 - C153 - C149 etc. I'm thinking of trying to create a For 157 To 149 statement, but I don't know how to make it skip by 4's, only in numerical order. If anyone knows the syntax to make this transition it would be much appreciated. If I can make it skip by 4 I think I can figure the rest out.
Comment