Copying and hiding issues...

Hi,

I need to create a macro which will copy A5:A500 on all grouped sheet
and paste them onto column A in a hidden worksheet "Shipped".  The har
part for me is one, I need to omit the blank spaces,  and two, thi
macro will be ran numerous times so I need it to continue from the las
cell containing data the next time it is ran.  Awaiting some muc
needed help.

Best Regards,
Mjac

--
Message posted from http://www.ExcelForum.com

0
2/18/2004 7:03:50 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
304 Views

Similar Articles

[PageSpeed] 14

Something like this???
Option Explicit
Sub testme01()

    Dim ShippedWks As Worksheet
    Dim wks As Worksheet
    Dim DestCell As Range
    
    Set ShippedWks = Worksheets("shipped")

    With ShippedWks
        For Each wks In ActiveWindow.SelectedSheets
            If wks.Name = ShippedWks.Name Then
                'do nothing
            Else
                Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
                wks.Range("a1:a500").Copy _
                    Destination:=DestCell
            End If
        Next wks

        On Error Resume Next
        .Columns(1).Cells.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
        On Error GoTo 0
    End With
End Sub

Continues from the lastcell containing data -- in the Shipped worksheet or
what???



"mjack003 <" wrote:
> 
> Hi,
> 
> I need to create a macro which will copy A5:A500 on all grouped sheets
> and paste them onto column A in a hidden worksheet "Shipped".  The hard
> part for me is one, I need to omit the blank spaces,  and two, this
> macro will be ran numerous times so I need it to continue from the last
> cell containing data the next time it is ran.  Awaiting some much
> needed help.
> 
> Best Regards,
> Mjack
> 
> ---
> Message posted from http://www.ExcelForum.com/

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
2/19/2004 3:16:07 AM
Thanks Dave! Works great.  Saved me a lot of time.

Best regards,
Mjack


---
Message posted from http://www.ExcelForum.com/

0
2/19/2004 4:22:39 PM
Reply:

Similar Artilces: