Copy ROW from one spreadsheet to another

alm395

New Member
Joined
Apr 23, 2018
Messages
39
Office Version
  1. 365
Platform
  1. Windows
I have a report I am working on. One sheet named "BlueSkyDATA" has the raw data I am pulling from. It has 19 columns (A-S) and hundreds of rows. If the time data in column K is greater than or equal to 1 hour, I would like that whole row to be copied to another spreadsheet in the same workbook, called "Dispatched" beginning at A4. How can I do this?

Thanks so much, in advance!
Ann
 
I managed to get it to pull the data how I needed it to by using the info below. I think the way to eliminate pulling duplicate data can be solved by setting a start and end date and time. Can you help with that? Sorry, I am just learning...



Sub New_Filter()
'Modified 4-23-18 4:50 PM EDT
Application.ScreenUpdating = False
Sheets("BlueSkyDATA").Activate
Dim Lastrow As Long

Lastrow = Sheets("BlueSky60").Cells(Rows.Count, "M").End(xlUp).Row + 1
If Lastrow < 2 Then Lastrow = 2
With ActiveSheet.Range(Cells(1, "M"), Cells(Cells(Rows.Count, "M").End(xlUp).Row, "M"))
.AutoFilter Field:=1, Criteria1:=">=" & TimeValue("01:00:00")
.Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).EntireRow.Copy Sheets("BlueSky60").Cells(Lastrow, "A")
.AutoFilter
End With

Application.ScreenUpdating = True
End Sub


Thanks so much!
Ann
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I'm not sure where we are going with this:
In Post 6 you said:
@My Answer is This
I had to tweak it a tiny bit, but it works!!! Thank you soo much! That just saved me so much time and a big 'ol headache! You are the BEST!!!

Then you asked for it to include more and I added more and you never responded back till now.
And now it sounds like you want something entirely different.

And how do you plan to tell the script the start and end dates and times?
 
Upvote 0
Sorry for not replying to the answer. I didn't see it until today.

I will just keep running the report the way I have it scripted in the last response and manually delete the duplicates.

Thank you for your time.


I'm not sure where we are going with this:
In Post 6 you said:
@My Answer is This
I had to tweak it a tiny bit, but it works!!! Thank you soo much! That just saved me so much time and a big 'ol headache! You are the BEST!!!

Then you asked for it to include more and I added more and you never responded back till now.
And now it sounds like you want something entirely different.

And how do you plan to tell the script the start and end dates and times?
 
Upvote 0
My script was never written to remove duplicates.
I work on scripts one step at a time. When I'm not sure what user wants.
So your saying the script worked but does not remove duplicates

In what column are we looking for duplicates?

And you want the duplicates deleted after they are copied to sheet named
Sheets("BlueSky60")
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,228
Members
453,025
Latest member
Hannah_Pham93

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top