Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Currently I have the following Macro:
Sub getvalues() lr = Application.Max(2, Cells(Rows.Count, 1).End(xlUp).Row) 'MsgBox lr Rows("2:" & lr).ClearContents With Worksheets("Master") slr = .Cells(Rows.Count, "c").End(xlUp).Row 'MsgBox slr For i = 6 To slr dlr = Cells(Rows.Count, "a").End(xlUp).Row + 1 ' If .Cells(i, "am") = upheld Then .Rows(i).Copy Rows(dlr) If .Cells(i, "am") = upheld And IsDate(.Cells(i, "aj")) Then ..Rows(i).Copy Rows(dlr) Next i End With End Sub The way it currently pulls information is it looks at column AM for any cells with "upheld". It then checks for a date in AJ. If both are met then it copies the row. This works perfectly for certain aspects of my spreadsheets, but I need two things that I can't figure out. The first, how can I change that above macro so that it won't clear or delete any information after its been copied over? Second, how can I change the macro to paste only the values of the cells that its copying from? Thanks in advance for any assistance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Paste-Special - R/T 1004 help needed | Excel Programming | |||
Cut and Paste using Macro gives paste special method error | Excel Programming | |||
Macro assistance needed | Excel Programming | |||
Code Assistance (Paste Special) | Excel Programming | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming |