close

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 codeCode:
--------------------
Sheets(quot;Weekly Non-Responder Techquot;).Select
Selection.AutoFilter Field:=3, Criteria1:=quot;SANFRANCISCO-OAKLAND-SANJOSE_CAquot;
Columns(quot;Dquot;).Select
Range(quot;D2quot;).Activate
Selection.AutoFilter Field:=4, Criteria1:=quot;gt;=2509quot;, Operator:=xlAnd, _
Criteria2:=quot;lt;=2688quot;
Range(quot;A1:K823quot;).Sort Key1:=Range(quot;D1quot;), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Cells.Select
Selection.Copy
Sheets(quot;Weekly Non-Responder Techquot;).Select
Sheets.Add
Sheets(quot;Sheet1quot;).Select
Sheets(quot;Sheet1quot;).Name = quot;In Housequot;
Cells.Select
ActiveSheet.Paste
Sheets(quot;Weekly Non-Responder Techquot;).Select
Range(quot;D1quot;).Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = quot;IR_TECHquot;
With ActiveCell.Characters(Start:=1, Length:=7).Font
.Name = quot;MS Sans Serifquot;
.FontStyle = quot;Regularquot;
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range(quot;D67quot;).Select
End Sub
----------------------
efface
------------------------------------------------------------------------
efface's Profile: www.excelforum.com/member.php...oamp;userid=33882
View this thread: www.excelforum.com/showthread...hreadid=536596
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: www.excelforum.com/member.php...oamp;userid=33882
View this thread: www.excelforum.com/showthread...hreadid=536596

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()