Results 1 to 2 of 2

Macros and cell selection

Threaded View

  1. #1
    Registered User
    Join Date
    04-26-2007
    Location
    MA
    Posts
    1

    Macros and cell selection

    I record a lot of macros and can go into VB to manipulate them, but a programer I am not. I could really use some programming help right now.

    I'm recording a macro to insert rows into a spreadsheet that is divided into sections. Section 1 runs from (A40:T52) with cell N53 being named SubA (it totals N40:N52). If I insert a row, SubA becomes cell N54 and inserting 2 rows would make it N55. I would like to insert individual rows as needed in the row above SubA (as well as SubB, SubC, SubD, and SubE). I can select SubA and I know the code to insert a row, but I can't figure out how to move up 1 cell without it referencing a specific cell (N52). That works for the first row I insert, but when I insert a second row, it will insert a blank row between data. I'm working on making this as user friendly as possible because the users won't be excel savy. Could anyone help me figure out what goes where the 3 ?'s are below in the lines of code? I would really appreciate the help.
    Range("SubA").Select
    ???
    Selection.EntireRow.Insert
    Thank you,

    Roy
    Last edited by Leith Ross; 05-21-2009 at 05:43 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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