Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi guys, this macro copies sheets from one workbook to another
depending on criteria If i run the macro when the originals sheets have a autofilter that filters all non blanks, it gives a problem. I want him to copy the sheets as values, so without the filter... The problem is in the last part :" Cells.PasteSpecial xlPasteValues"!!! If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report RSU").Range("a4").Value Then If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report ESPP").Range("a3").Value Then If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report F Shares").Range("a3").Value Then Sheets(Array("Overview", "Report Option Plan", "Report RSU", "Report ESPP", "Report F Shares")).Copy Else Sheets(Array("Overview", "Report Option Plan", "Report RSU", "Report ESPP")).Copy End If Else If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report F Shares").Range("a3").Value Then Sheets(Array("Overview", "Report Option Plan", "Report RSU", "Report F Shares")).Copy Else Sheets(Array("Overview", "Report Option Plan", "Report RSU")).Copy End If End If Else If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report ESPP").Range("a3").Value Then If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report F Shares").Range("a3").Value Then Sheets(Array("Overview", "Report Option Plan", "Report ESPP", "Report F Shares")).Copy Else Sheets(Array("Overview", "Report Option Plan", "Report ESPP")).Copy End If Else Sheets(Array("Overview", "Report Option Plan", "Report F Shares")).Copy End If End If Worksheets.Select Cells.Copy Cells.PasteSpecial xlPasteValues Worksheets(1).Buttons.Delete Cells(1).Select Worksheets(1).Select Application.CutCopyMode = False |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs | Setting up and Configuration of Excel | |||
One macro runs then it auto runs another macro | Excel Discussion (Misc queries) | |||
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? | Excel Programming | |||
Unprotecting 4 sheets before "WorkbookOpen" macro runs | Excel Discussion (Misc queries) | |||
macro to filter sheets | Excel Programming |