PC Review


Reply
Thread Tools Rate Thread

Copying Entries Help

 
 
James8309
Guest
Posts: n/a
 
      9th Jul 2008
Hi everyone

I have 5 sheets, Sheet1, Sheet2,Sheet3,Sheet4 and Sheet5

1. Only Sheet1,2,3 and 4 has data on Column A:C from Row 3. Last Row
always changes for those sheets. Column A is always full to the very
last row but column B & C has alot of empty cells.

2. Sheet5 is emtpy, This sheet is for the result

3. What I want to do is find cells in column B for each sheets (From
B3 to Lastrow in columnA) which has values in it ( <>"") then copy
that entire row and paste into Sheet5 (from Row 3)

4. i.e. Perform this for sheet1 then copy paste the result to sheet5
then sheet2's result will be on sheet5 Lastrow and same thing upto
sheet4.

Can anyone help?

Thank you.


regards,

James
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      9th Jul 2008
Hi

Try this:

Sub CopyData()
Application.ScreenUpdating = False
Dim FilterRange As Range
Dim CopyToRange As Range

shArray = Array("Sheet1", "Sheet2", "Sheet3", "Sheet4")
With Sheets("sheet5")
Set CopyToRange = .Range("A3")
End With
For sh = 0 To UBound(shArray)
Sheets(shArray(sh)).Activate
LastRow = Range("A3").End(xlDown).Row
Set FilterRange = Range("A3", Cells(LastRow, "C"))
FilterRange.AutoFilter field:=2, Criteria1:="<>"
FilterRange.copy Destination:=CopyToRange
FilterRange.AutoFilter
With Sheets("Sheet5")
Set CopyToRange = .Range("A3").End(xlDown)
End With
Next
Application.ScreenUpdating = True
End Sub

Regards
Per

"James8309" <(E-Mail Removed)> skrev i meddelelsen
news:7146426e-6e8e-4136-bf56-(E-Mail Removed)...
> Hi everyone
>
> I have 5 sheets, Sheet1, Sheet2,Sheet3,Sheet4 and Sheet5
>
> 1. Only Sheet1,2,3 and 4 has data on Column A:C from Row 3. Last Row
> always changes for those sheets. Column A is always full to the very
> last row but column B & C has alot of empty cells.
>
> 2. Sheet5 is emtpy, This sheet is for the result
>
> 3. What I want to do is find cells in column B for each sheets (From
> B3 to Lastrow in columnA) which has values in it ( <>"") then copy
> that entire row and paste into Sheet5 (from Row 3)
>
> 4. i.e. Perform this for sheet1 then copy paste the result to sheet5
> then sheet2's result will be on sheet5 Lastrow and same thing upto
> sheet4.
>
> Can anyone help?
>
> Thank you.
>
>
> regards,
>
> James


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Combo Box Entries Owen Microsoft Word Document Management 0 28th Jan 2009 11:32 AM
Looking for entries and copying to a cell Budask Microsoft Excel Worksheet Functions 1 5th Jun 2008 07:17 AM
copying entries and changing.... =?Utf-8?B?R2FyeQ==?= Microsoft Access 6 2nd Jun 2006 07:13 AM
Copying entries from one folder to another CJ Microsoft Outlook 0 13th Aug 2004 06:45 PM
Re: copying duplicate entries Dave Peterson Microsoft Excel Programming 0 10th Jul 2003 04:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:56 AM.