View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Selecting all cells

Sub copyToTotal()
Dim sh as Worksheet
Dim x as Long
x = 100
for each sh in ActiveWorkbook.Worksheets
if lcase(sh.name) < "total" then
Range("2:" & x).Copy Destination:= _
worksheets("Total").Cells(rows.count,1).end(xlup)( 2)
end if
Next
End sub

--
Regards,
Tom Ogilvy


"Deus DNE" wrote in message
...
Hi,

I have a workbook with x number of sheets in it, each sheet contains x

rows.
The top row being the column titles. I need to write a macro/VB to select
all rows containing data except the title row, and paste them into a total
sheet.

What I really need is something more complex, but this will do for

starters
!

Hope you can help.

TIA

Deus
--
Does Not Exist