View Single Post
  #4   Report Post  
Hidaya
 
Posts: n/a
Default

Hi Don ,
When I use for... each ws in worksheet, there is an error "Run time error
1004.No cells were found." at this code.

Selection.SpecialCells(xlCellTypeBlanks).Select

And it doesn't move to the next worksheet. Is there a way to make the macro
run only on selected worksheets only (e.g WS1 to WS10, WS13 to WS 15 etc
....)?. Thank you.



"Don Guillett" wrote:

for each ws in worksheets
your code
next ws

BTW. Your code could be more efficient by getting rid of selections. Example
========
Columns("s").Value = Columns("s").Value

Columns("S:S").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False
==================