Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
efface
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
efface
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to find, copy, and paste until value change Valerie Excel Worksheet Functions 4 January 26th 06 04:10 AM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Macro to open workbook and copy and paste values in to orig workbo Dena X Excel Worksheet Functions 1 December 15th 05 11:13 PM
How to copy subtotalled cells to a new worksheet (in a macro), wi. LJB Excel Discussion (Misc queries) 2 June 23rd 05 02:00 AM
Copy Paste macro GWB Direct Excel Discussion (Misc queries) 2 May 9th 05 03:31 PM


All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"