Results 1 to 3 of 3

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

Threaded View

  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:

    Dim formRange As Range
    Set formRange = Range(Cells(2, 11), Cells(EndRow, 11))
    
    With formRange
      .FormulaR1C1 = "=COUNTA(RC[-9]:RC[-1])"
    End With
    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:
    Set formRange = Sheets("Report").Range(Cells(2,11), Cells(EndRow, 11))
    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.

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. [SOLVED] 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. Mental Block! - Event Change Conditional Formatting
    By donna.gough@hydro.com 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