View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
deelee[_18_] deelee[_18_] is offline
external usenet poster
 
Posts: 1
Default A couple of questions (formating & Collating worksheets)


Hi Peter,

thanks for your reply and help - I've resolved my 1st problem with your
suggestion, however, I'm still stuck with collating the sheets.

I 'borrowed' the code to do this and don't really understand it
(haven't got to grips with VBA!).

The code I've used is below and I just inserted this and it worked
(with a few trial and error adjustments)!

'Clean the destination... (leave 1 headerrow)
wsDst.UsedRange.Offset(2).ClearContents

'loop thru an array of sheets
For Each wsSrc In wb.Worksheets( _
Array("Carrie", "Dave", "Eileen", "Geraldine", "Jabeen", "Jackie",
"Julie", "Pauline", "Rebecca"))
'alt: array(2,3,4,5)

'find the current region starting at cell A1
Set rgSrc = wsSrc.Cells(1).CurrentRegion
'shift 1 row down to skip the headers.
Set rgSrc = rgSrc.Resize(rgSrc.Rows.Count - 1).Offset(1)

'find the last value in column A on master
Set rgDst = wsDst.Cells(Rows.Count, 1).End(xlUp)
'shift 1 row down and size same as source
Set rgDst = rgDst.Resize( _
rgSrc.Rows.Count, rgSrc.Columns.Count).Offset(1)
'copy the values
rgDst.Value = rgSrc.Value
Next

I would love to be able to collate all worksheets but I have a Master
where the collation's done and the hidden Template for my new users

Any suggestions would be welcome.

Regards,

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile: http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=556391