Hi All,
Once again I have confused myself and wonder if you can offer a shining light.
I have the following code:
I basically need all these cells to have the same value - the named range 'NP1'. This code will be repeated 13 times for my ranges NP1 - NP13 for all 13 periods within the document.
I have been reading and wonder if I can perform this action, but using an array. If so, how as I cant seem to figure that out and do you think this offer any advantages over running the code above.
Many thanks for any suggestions. I'm fairly new to this and am eager to learn better methods.
Kind regards, Upex
Once again I have confused myself and wonder if you can offer a shining light.
I have the following code:
Code:
Sub BulkSelectForPeriodInsert()
Sheets("forecast of 1st Period").range("B2:C2").Value = range("np1").Value
Sheets("review of 1st period").range("B2:C2,B12:C12").Value = range("NP1").Value
Sheets("member progression 1st period").range("B2:C2").Value = range("Np1").Value
Sheets("observations 1st Period").range("B2:C2,C78:D78,C148:D148,C218:D218,C288:D288,C358:D358,C428:D428,C498:D498,R498:S498,R428:S428,R358:S358,R288:S288,R218:S218,R148:S148,R78:S78,AG78:AH78,AG148:AH148,AG218:AH218,AG288:AH288,AG358:AH358,AG428:AH428,AG498:AH498,AV498:AW498,AV428:AW428").Value = range("NP1").Value
Sheets("forecast of 2nd Period").range("B2:C2").Value = range("np2").Value
Sheets("review of 2nd period").range("B2:C2,B12:C12").Value = range("NP2").Value
Sheets("member progression 2nd period").range("B2:C2").Value = range("Np2").Value
Sheets("observations 2nd Period").range("B2:C2,C78:D78,C148:D148,C218:D218,C288:D288,C358:D358,C428:D428,C498:D498,R498:S498,R428:S428,R358:S358,R288:S288,R218:S218,R148:S148,R78:S78,AG78:AH78,AG148:AH148,AG218:AH218,AG288:AH288,AG358:AH358,AG428:AH428,AG498:AH498,AV498:AW498,AV428:AW428").Value = range("NP2").Value
'etc up to 13th period
End Sub
I basically need all these cells to have the same value - the named range 'NP1'. This code will be repeated 13 times for my ranges NP1 - NP13 for all 13 periods within the document.
I have been reading and wonder if I can perform this action, but using an array. If so, how as I cant seem to figure that out and do you think this offer any advantages over running the code above.
Many thanks for any suggestions. I'm fairly new to this and am eager to learn better methods.
Kind regards, Upex
Last edited: