Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need help to perform this task.
For dt=2 to 1000 If cells(dt,1)=date then Copy paste special this row. Next dt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I understand your question correctly, this should do what you want...
Dim dt As Long Dim LastRow As Long For dt = 2 To 1000 If Cells(dt, 1) = Date Then With Worksheets("SomeOtherSheet") LastRow = .Cells(Rows.Count, 1).End(xlUp).Row Cells(dt, 1).EntireRow.Copy .Cells(LastRow, 1).Offset(1, 0) End With End If Next dt You didn't supply a lot of information, so I set it up to run from the active sheet and place the copied data to SomeOtherSheet. Rick "Rpettis31" wrote in message ... I need help to perform this task. For dt=2 to 1000 If cells(dt,1)=date then Copy paste special this row. Next dt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have data that is prefilled from other sheets to this master sheet.
The dates are prefilled and a Vlookup applies the data in the appropriate cell without VB. I just want to copy and paste special the values in the sheet for the current date. DATE Positions 03/12/08 500 <--- want to automate the copy paste special rather than the manual process. "Rick Rothstein (MVP - VB)" wrote: If I understand your question correctly, this should do what you want... Dim dt As Long Dim LastRow As Long For dt = 2 To 1000 If Cells(dt, 1) = Date Then With Worksheets("SomeOtherSheet") LastRow = .Cells(Rows.Count, 1).End(xlUp).Row Cells(dt, 1).EntireRow.Copy .Cells(LastRow, 1).Offset(1, 0) End With End If Next dt You didn't supply a lot of information, so I set it up to run from the active sheet and place the copied data to SomeOtherSheet. Rick "Rpettis31" wrote in message ... I need help to perform this task. For dt=2 to 1000 If cells(dt,1)=date then Copy paste special this row. Next dt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Unless I am missing something, that is what the code I posted does (you
would run the code from your master sheet and specify whatever the name of the sheet you are copying the information to in the With statement. Rick "Rpettis31" wrote in message ... I have data that is prefilled from other sheets to this master sheet. The dates are prefilled and a Vlookup applies the data in the appropriate cell without VB. I just want to copy and paste special the values in the sheet for the current date. DATE Positions 03/12/08 500 <--- want to automate the copy paste special rather than the manual process. "Rick Rothstein (MVP - VB)" wrote: If I understand your question correctly, this should do what you want... Dim dt As Long Dim LastRow As Long For dt = 2 To 1000 If Cells(dt, 1) = Date Then With Worksheets("SomeOtherSheet") LastRow = .Cells(Rows.Count, 1).End(xlUp).Row Cells(dt, 1).EntireRow.Copy .Cells(LastRow, 1).Offset(1, 0) End With End If Next dt You didn't supply a lot of information, so I set it up to run from the active sheet and place the copied data to SomeOtherSheet. Rick "Rpettis31" wrote in message ... I need help to perform this task. For dt=2 to 1000 If cells(dt,1)=date then Copy paste special this row. Next dt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Copy; Paste; Paste Special are disabled | Excel Discussion (Misc queries) | |||
Automating copy/paste/paste special when row references change | Excel Programming | |||
help w/ generic copy & paste/paste special routine | Excel Programming | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming |