Macros to search for date, copy full row and paste in different spreadsheet

shefer13

New Member
Joined
Aug 1, 2011
Messages
5
Hi guys,

I need your help. I'm trying to find a macro that will search for a particular date within the spreadsheet. once found copy all rows that contain this date in column A and paste in another spreadsheet.

The spreadsheet contains in column a date , column b to column x different data text, numbers etc.

Please help.:eeek:
 
Hi guys,

I need your help. I'm trying to modify this macro to search for Date Range in a specific column, and to search Date Range in several columns in one Worksheet also, and after that to paste the rows in sheets or Workbook.

Sub CopyDateRows()
Dim myDate As String

myDate = InputBox("Enter Date")
If IsDate(myDate) Then
ActiveSheet.Copy after:=ActiveSheet
With ActiveSheet.UsedRange.Columns(2)
.AutoFilter Field:=1, Criteria1:= _
"<>" & CLng(DateValue(myDate))
.Offset(2).EntireRow.Delete
.AutoFilter
End With
Application.ScreenUpdating = True
Else
MsgBox "No valid date entered"
End If
End Sub

Please help.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,518
Messages
6,179,248
Members
452,900
Latest member
LisaGo

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