Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Copying Entries Help

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Copying Entries Help

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" skrev i meddelelsen
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying information down a row that changes after new entries stacie Excel Discussion (Misc queries) 1 March 10th 09 06:11 PM
Looking for entries and copying to a cell Budask Excel Worksheet Functions 1 June 5th 08 07:17 AM
Counting entries and copying pcor New Users to Excel 2 March 19th 07 03:33 PM
Matching and Copying entries Box666 Excel Discussion (Misc queries) 1 January 9th 06 09:45 PM
copying duplicate entries Dave Peterson[_3_] Excel Programming 0 July 10th 03 04:15 AM


All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"