Macro copy and paste = blank worksheet

E

efface

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
 
E

efface

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 le
me filter numbers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top