imback2nite
Board Regular
- Joined
- Oct 30, 2004
- Messages
- 211
- Office Version
- 2003 or older
- Platform
- Windows
Is it possible to use the code below and keep the formatting in the affected cells? I’m using this code but it goes on for thirty pages. The Array works but the formatting is totally gone. I need the Bold and Font to stay the same as well as the cell colors. Is it possible? Or is there a better way entirely? I'm using Excel 2003. Yes, ancient.
This code does what I want but it's huge!
Rich (BB code):
For Each iselect In Sheets(Array("Emp1", "Emp2",”Emp3”,”Emp4”, “Emp5” to "Emp30"))
Sheets(iselect.Name).Activate
Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Next iselect
Rich (BB code):
Sheets("Emp1").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp1").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp1").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp2").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp2").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp2").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp3").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp3").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp3").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp4").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp4").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp4").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp5").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp5").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp5").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp6").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp6").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp6").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp7").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp7").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp7").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp8").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp8").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp8").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp9").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp9").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp9").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp10").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp10").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp10").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp11").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp11").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp11").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp12").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp12").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp12").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp13").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp13").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp13").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp14").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp14").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp14").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp15").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp15").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp15").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp16").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp16").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp16").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp17").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp17").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp17").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp18").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp18").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp18").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp19").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp19").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp19").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp20").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp20").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp20").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp21").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp21").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp21").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp22").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp22").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp22").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp23").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp23").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp23").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp24").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp24").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp24").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp25").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp25").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp25").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp26").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp26").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp26").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp27").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp27").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp27").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp28").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp28").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp28").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp29").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp29").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp29").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value
Sheets("Emp30").Range("P8:P9") = Sheets("Tally Sheet").Range("Z15:Z16").Value
Sheets("Emp30").Range("Y3:Y9") = Sheets("Tally Sheet").Range("Z17:Z23").Value
Sheets("Emp30").Range("AF3:AF9") = Sheets("Tally Sheet").Range("Z24:Z30").Value