Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro copy and paste = blank worksheet
I'm creating a macro and it's not functioning the same once I use it. I first sort a column by a number range, click the top left corner, copy the data, insert a new sheet, and then i paste it. While I create the macro everything is fine. But when I use the macro, it does everything I told it, it copies the header but none of the data, it's completely blank. Does anyone know what i am doing wrong? Here is the VMB code Code: -------------------- Sheets("Weekly Non-Responder Tech").Select Selection.AutoFilter Field:=3, Criteria1:="SANFRANCISCO-OAKLAND-SANJOSE_CA" Columns("D:D").Select Range("D2").Activate Selection.AutoFilter Field:=4, Criteria1:="=2509", Operator:=xlAnd, _ Criteria2:="<=2688" Range("A1:K823").Sort Key1:=Range("D1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Cells.Select Selection.Copy Sheets("Weekly Non-Responder Tech").Select Sheets.Add Sheets("Sheet1").Select Sheets("Sheet1").Name = "In House" Cells.Select ActiveSheet.Paste Sheets("Weekly Non-Responder Tech").Select Range("D1").Select Application.CutCopyMode = False ActiveCell.FormulaR1C1 = "IR_TECH" With ActiveCell.Characters(Start:=1, Length:=7).Font .Name = "MS Sans Serif" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Range("D67").Select End Sub -------------------- -- efface ------------------------------------------------------------------------ efface's Profile: http://www.excelforum.com/member.php...o&userid=33882 View this thread: http://www.excelforum.com/showthread...hreadid=536596 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro copy and paste = blank worksheet
well i solved my own problem. So i will post the solution incase anyone else needs it. the column was formatted as text and not numbers. So it would not let me filter numbers. -- efface ------------------------------------------------------------------------ efface's Profile: http://www.excelforum.com/member.php...o&userid=33882 View this thread: http://www.excelforum.com/showthread...hreadid=536596 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to find, copy, and paste until value change | Excel Worksheet Functions | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions | |||
How to copy subtotalled cells to a new worksheet (in a macro), wi. | Excel Discussion (Misc queries) | |||
Copy Paste macro | Excel Discussion (Misc queries) |