+ Reply to Thread
Results 1 to 4 of 4

INdirect function in VBA

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    68

    INdirect function in VBA

    There's a number of threads on here regarding how to incorporate the use of the "INDIRECT" function withina macro, but all answers quickly go over my head and i'm unable to translate to my particular problem. All of the cells referred to in the below macro, for me need to NOT change whether or not rows are inserted or deleted above row 58 (as they most certainly will).

    IN my simple excel formula mind, I want to just put "Rows (INDIRECT("$58:$58")).Select", and repeate throughout. That obviously won't work.
    Any help/suggestions are appreciated.

    Thanks!

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    06-15-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: INdirect function in VBA

    Having trouble with this. This is not what i need, so please disregard until i figure out what in the world i really do need, if anything.

  3. #3
    Registered User
    Join Date
    06-15-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: INdirect function in VBA

    I'm going to give this another shot. Interestingly, my original question was the exact opposite of what I needed. What I needed at the time was to walk away from the computer.

    PLease see attached spreadsheet. There are two tables inserted into sheet directly underneath each other. Each has a button where the intent is to insert 3 rows starting at the 1st row of each table. PRoblem is if the insert button above the first table is checked first, then the reference to the "insert row" on the second table (row 21 in this case), is now actually above the table
    Is there a way to have the macro insert additional rows into the first row of the appropriate table
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: INdirect function in VBA

    Try this for Table2, adapt for Table1.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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