I have the following code which iterates through about 1000 worksheets, each time selecting the sheet, copying the value of cell BC88 and then pasting this value in to a different cell on sheet PCC_SUMMARY (but also always selecting worksheet PCC_SUMMARY as well). I realise this is inefficent since it has to select the sheets all the time and there is a way to just copy/paste the data without selecting sheets. It probably makes use of the with.sheet command but I have tried variations and cannot get it to work!
Would greatly appreciate it if someone can amend the code or give me some pointers as it is making my macro run very slowly at the moment....
Thanks
-Rob
![]()
Sub get_number() Dim ws Dim store_number As Variant count = 3 'row 3 on sheet PCC_SUMMARY For Each ws In ActiveWorkbook.Sheets ws.Select store_number = Range("BC88") Sheets("PCC_SUMMARY").Select Cells(count, 16) = store_number count = count + 1 Next ws End Sub
Bookmarks