+ Reply to Thread
Results 1 to 5 of 5

How to change the reference worksheet based on a value of a cell

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    PH
    MS-Off Ver
    2013
    Posts
    31

    Exclamation How to change the reference worksheet based on a value of a cell

    I'm using countif formula to count a value in a range:

    this the formula i used and this worked.
    =COUNTIF('Nery Roxas'!G5:G25,1)

    But I want the worksheet reference to be based on a cell.

    in cell A1 the value is Nery Roxas, the formula should be like

    =COUNTIF('A1'!G5:G25,1)

    but it gives me error.

    Thanks in Advanced!

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: How to change the reference worksheet based on a value of a cell

    =countif(indirect(a1& "!g5:g25"),1)

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to change the reference worksheet based on a value of a cell

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    PH
    MS-Off Ver
    2013
    Posts
    31

    Re: How to change the reference worksheet based on a value of a cell

    it give me an error. anyway thanks!

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to change the reference worksheet based on a value of a cell

    What is the error? Do you have a Sheet Name in Range("A1")?

+ 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. Copy data from a copied worksheet to another worksheet based on cell reference
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2013, 02:18 PM
  2. Replies: 4
    Last Post: 10-30-2012, 06:15 PM
  3. Display data reference from another worksheet based on cell reference
    By Drew123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2011, 03:52 PM
  4. I want to change a cell reference based on where the cursor is.
    By 7redmetal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-15-2005, 03:45 AM
  5. [SOLVED] How to change reference to other worksheet by changing one cell?
    By Ms.Vahl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-10-2005, 03:00 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