Results 1 to 3 of 3

simplifying macro coding (removing.select mostly)

Threaded View

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    36

    simplifying macro coding (removing.select mostly)

    hi everyone,
    I need some help figuring out how to simplify some of my coding (i'm fairly new and still use a bunch of .select

    the macro selects two rows from a template and pasts it into a report, then it autofilters data and copies visible cells over to paste below the template rows.
    Here is what I use right now (the section only)
    ' insert the next lines from template (with space)
     Sheets("Report-template").Select
        Range("A6:I7").Select
        Selection.Copy
        Sheets("Full HP Report").Select
        Range("A4").Select
        Selection.End(xlDown).Select
        ActiveCell.Offset(3, 0).Select
        ActiveSheet.Paste
    
    Sheets("worklist formatted").Select
     ActiveSheet.Range("$A$1:$Q$1000").AutoFilter Field:=6, Criteria1:= _
            "=Draw Rescheduled", Operator:=xlOr, Criteria2:="=Draw Scheduled"
    ' copy visible cells only for columns A through I
    Range("A2:I2").Select
    Range("A2:I500").SpecialCells(xlCellTypeVisible).Copy
    ' paste in second section
    Worksheets("Full HP Report").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
    Application.CutCopyMode = False
    Application.ScreenUpdating = True

    How could I simplify this?

    I'm also loosing some of the formatting when I paste the cells (certain rows are supposed to be bold but formatting is not copied)



    Thank you
    Last edited by alexcrofut; 05-09-2014 at 11:03 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-02-2013, 11:16 PM
  2. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-02-2013, 05:04 AM
  3. [SOLVED] Excel 2007 : If Then Else and/or Select Case Coding Assistance
    By MrSir in forum Excel General
    Replies: 3
    Last Post: 07-05-2012, 12:48 PM
  4. Re-coding Macro to remove Activate & Select functions
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2012, 11:32 AM
  5. Speed Up Macro by Removing Select Commands
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-25-2007, 04:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1