+ Reply to Thread
Results 1 to 7 of 7

Refencing Worksheets Issues

  1. #1
    Registered User
    Join Date
    08-07-2017
    Location
    Adelaide, Australia
    MS-Off Ver
    2013
    Posts
    3

    Refencing Worksheets Issues

    I have little to no experience in VBA and I am struggling with referencing a worksheet within my code.

    Basically what I am trying to do is look at the Raw Data sheet for a certain date and a range of values and then add the minutes associated with these values to another sheet. I am 99% sure my issues are with the referencing of the worksheets but I have done some googling and am a bit stuck.

    Cheers

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Refencing Worksheets Issues

    The worksheet references look fine here,
    Please Login or Register  to view this content.
    however you don't have any worksheet references here.
    Please Login or Register  to view this content.
    Without worksheet references here both instances of Cells will refer to the sheet that is active when the code runs.

    By the way, where does the 'x' in the code come from?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-07-2017
    Location
    Adelaide, Australia
    MS-Off Ver
    2013
    Posts
    3

    Re: Refencing Worksheets Issues

    Woops I forgot to change something over when I edited it.

    I'm getting Run-time error 9 Subscript out of range now.

    Cheers for the help

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Refencing Worksheets Issues

    do you have data in these cells? Works ok for me.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Refencing Worksheets Issues

    That error suggests you don't have sheets named exactly 'Aug 17' and 'Raw Data' in the active workbook.

    Check the sheet names again and look for things like trailing/leading spaces/typos.

  6. #6
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Refencing Worksheets Issues

    Or a sheet named "Raw".
    My guess is either "raw" should be "raw data" or "raw data" should be "raw"

    Please Login or Register  to view this content.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  7. #7
    Registered User
    Join Date
    08-07-2017
    Location
    Adelaide, Australia
    MS-Off Ver
    2013
    Posts
    3

    Re: Refencing Worksheets Issues

    Quote Originally Posted by scottiex View Post
    Or a sheet named "Raw".
    My guess is either "raw" should be "raw data" or "raw data" should be "raw"

    Please Login or Register  to view this content.
    Yeah thank you, this was the issue.

    Cheers everyone

+ 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] Different Worksheets with Similar name issues
    By narkissos in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-04-2013, 02:51 PM
  2. Worksheets, Indirect References and Performance Issues
    By Rikkdh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2013, 09:36 AM
  3. Hyperlinks and Absolute Cell Refencing Problem
    By bfs3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2013, 07:21 AM
  4. Issues having more than one user update worksheets using VBA Form
    By llanusa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2012, 04:26 PM
  5. Variable refencing within calculations
    By ranald in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-11-2012, 04:11 AM
  6. Refencing a file in the same folder.
    By cbouley in forum Excel General
    Replies: 0
    Last Post: 08-26-2010, 02:05 PM
  7. Cell referencing issues to other worksheets.
    By RockECU in forum Excel General
    Replies: 9
    Last Post: 02-03-2009, 09:42 AM
  8. Refencing a Microsoft WORD Library in EXCEL VBA
    By Mark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2005, 03:05 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