+ Reply to Thread
Results 1 to 2 of 2

Macros and referencing other sheets

  1. #1
    Registered User
    Join Date
    10-03-2017
    Location
    Australia, Sydney
    MS-Off Ver
    2016
    Posts
    4

    Macros and referencing other sheets

    Hi, in the spreadsheet attached I'm trying to use macros to generate the number of rows in cells A2 (in both sheets) to increase linearly starting from B4 downwards. e.g. if cell A2 had the number 5 in it, cells B4 to B9 would fill from 1 to 5. I've done the coding on VBA to do this, but the next step I'm trying to achieve is to use macros for different sheets as I've tried to attempt in the VBA code. But the coding for the second sheet isn't working. I'm very new to using excel macros, and I tried looking up the error to the code and tried debugging but I can't find the solution. Is the Sheet2! referencing wrong to do in this case?, because that's what I always used in IF statements in excel when i reference other sheets in the workbook.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macros and referencing other sheets

    Hello Selsunblue,

    Try referencing each sheet that you have in the workbook as follows:-
    Please Login or Register  to view this content.
    I hope that this helps.

    Cheerio,
    vcoolio.

+ 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. [SOLVED] Referencing Other Sheets
    By OverKnight in forum Excel General
    Replies: 6
    Last Post: 02-09-2017, 01:03 PM
  2. Copying sheets to a new WB, but macros are still referencing the old WB?
    By Gumbeez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2015, 04:07 PM
  3. [SOLVED] Referencing Between Different Sheets
    By daveleek in forum Excel General
    Replies: 3
    Last Post: 07-30-2012, 09:18 AM
  4. Macros and VBA Simple but confusing cell referencing
    By hartnrn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2009, 01:42 PM
  5. hiding sheets but still letting macros run when printing hidden sheets
    By stevesunfold in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 11-13-2008, 04:35 AM
  6. Referencing ranges in different sheets
    By joe_idzhar in forum Excel General
    Replies: 2
    Last Post: 08-21-2006, 07:49 AM
  7. Referencing other sheets
    By djarcadian in forum Excel General
    Replies: 1
    Last Post: 03-03-2005, 02:31 PM

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