+ Reply to Thread
Results 1 to 5 of 5

Autofill Relative Equation Across Sheets

  1. #1
    Registered User
    Join Date
    08-22-2008
    Location
    USA
    Posts
    10

    Autofill Relative Equation Across Sheets

    Hi everyone.

    I'm trying to take this equation:

    Sheets("Sheet1").Activate
    Count = Range("C4")
    Sheets("Sheet2").Activate
    Range("C4") = Range("C4") + Count
    Sheets("Sheet1").Activate
    Range("C4").ClearContents
    And AutoFill cells C4 through C42 on Sheet2 in the same way.

    When I try to use an Autofill command, it just fills them all in with the same numerical value as Sheet2C4.

    Thanks for any help.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I can't tell from your example and explanation exactly what you're trying to do, but maybe like this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-22-2008
    Location
    USA
    Posts
    10
    Quote Originally Posted by shg View Post
    I can't tell from your example and explanation exactly
    Sorry for not being more clear. I'm trying to have the values in the cells of Sheet1 added to the values in the same cells on Sheet2. It is for tracking inventory levels. Sheet2 is the total inventory, while Sheet1 is the week's purchases. This way, when the macro is run, a week's purchases are added to the total inventory, while Sheet1 is cleared and readied for more entries the next week.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Try the code I posted.

  5. #5
    Registered User
    Join Date
    08-22-2008
    Location
    USA
    Posts
    10
    Thanks so much shg, that works great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Determining relative file path macro
    By ctmurray in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2007, 12:25 AM
  2. SUMPRODUCT across Multiple Sheets in the same workbook
    By Adrian17 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2007, 01:41 PM
  3. Printing Multiple Sheets to One PDF file
    By johnnywinter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2007, 11:03 AM
  4. renaming multiple sheets in a workbook w/ autofill?
    By HRuser in forum Excel General
    Replies: 8
    Last Post: 10-16-2006, 12:02 PM
  5. Grabbing next sheets names for autofill
    By matt_pl in forum Excel General
    Replies: 3
    Last Post: 09-29-2006, 03:46 AM

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