+ Reply to Thread
Results 1 to 3 of 3

Macro to tell cell to become cell + 1

  1. #1
    Registered User
    Join Date
    11-27-2007
    Posts
    2

    Macro to tell cell to become cell + 1

    Sorry, I'm new to excel. How do I tell a cell that is linking to another workbook to be the cell + 1. Such as:

    Cell A1 = "='[Copy of New Hire September.xls]Sheet1'!S133"

    How do I get the macro to turn that into:


    Cell A1 = "='[Copy of New Hire September.xls]Sheet1'!S134"

    Thanks!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Masterott,

    Welcome to the forum! This function takes a qualified range (must include the sheet name) and increments the row by one. Copy the macro code below into a Standrad VBA Module.
    Please Login or Register  to view this content.
    Macro Example
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-27-2007
    Posts
    2
    Thanks so much for your help. Now how would I make it so that, for example:

    A1 = ='[Copy of New Hire September.xls]Sheet1'!$S$145
    C1 = ='[Copy of New Hire September.xls]Sheet1'!$T$145
    E1 = ='[Copy of New Hire September.xls]Sheet1'!$U$145
    Sheet2.A1 = ='[Copy of New Hire September.xls]Sheet1'!$V$145

    and then the next time I run the macro:

    A1 = ='[Copy of New Hire September.xls]Sheet1'!$S$146
    C1 = ='[Copy of New Hire September.xls]Sheet1'!$T$146
    E1 = ='[Copy of New Hire September.xls]Sheet1'!$U$146
    Sheet2.A1 = ='[Copy of New Hire September.xls]Sheet1'!$V$146

    ....and so on

    Thank you.

+ 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