+ Reply to Thread
Results 1 to 3 of 3

Mental block - how to set a range with sheets and cells

  1. #1
    Registered User
    Join Date
    11-25-2011
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    42

    Mental block - how to set a range with sheets and cells

    I'm at a mental block. This is inside a private sub that calls it and provides the EndRow argument. I it works, but only if I first "select" the sheet on which I want the formula placed:

    Please Login or Register  to view this content.
    What I'd like to do is add the sheetname to the set statement so I can avoid selecting or activating the sheet. Something like this:
    Please Login or Register  to view this content.
    I know that's incorrect, but I'm at a mental block on it.
    Last edited by franklin_m; 11-02-2017 at 05:41 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Mental block - how to set a range with sheets and cells

    Presumably

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or better still

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    even better use the Sheet VBA code name rather than the sheet tab name since the tab name is too easily changed and will screw up your macro.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    11-25-2011
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: Mental block - how to set a range with sheets and cells

    Thanks .. it worked 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. Block text input if range of cells is empty
    By lamarao in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2015, 09:06 AM
  2. Block different than 8 numbers to defined cells range
    By demonofhell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 07:57 AM
  3. [SOLVED] Function to analyse each 48 cell block in a range of 95 cells
    By huntw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-25-2012, 05:22 AM
  4. [SOLVED] Mental block
    By Jack Sheet in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-22-2006, 04:35 PM
  5. Really Easy But having a mental Blank
    By Andibevan in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-06-2005, 01:05 AM
  6. [SOLVED] Mental Block! - Event Change Conditional Formatting
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2005, 09:06 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