+ Reply to Thread
Results 1 to 5 of 5

COUNTIF with cellname in formula?

  1. #1
    Registered User
    Join Date
    12-14-2018
    Location
    Amsterdam
    MS-Off Ver
    Office 2007 & 2016
    Posts
    23

    Question COUNTIF with cellname in formula?

    Is it possible to have a cell reference in a COUNTIF formula?

    This is the formula: COUNTIF(Amsterdam!A:A)
    it counts the number of rows in sheet Amsterdam.

    I would like to replace Amsterdam for the text of cell A2.
    I have tried different ways of brackets, but am not able to find the right combination.

    Can someone help?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,256

    Re: COUNTIF with cellname in formula?

    =COUNTA(INDIRECT("'"&A2&"'!A:A"))
    I think this will work
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,030

    Re: COUNTIF with cellname in formula?

    How about
    =COUNTA(INDIRECT("'"&A2&"'!A:A"))

    Beaten2it

  4. #4
    Registered User
    Join Date
    12-14-2018
    Location
    Amsterdam
    MS-Off Ver
    Office 2007 & 2016
    Posts
    23

    Re: COUNTIF with cellname in formula?

    This works, thanx.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,030

    Re: COUNTIF with cellname in formula?

    Glad we could help & thanks for the feedback

+ 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] formula to identify the unique code after filtration using countif or other formula
    By felixpanganiban in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-27-2019, 01:25 PM
  2. [SOLVED] COUNTIF formula where part of the range reference needs to use the result of a formula
    By zookeepertx in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-09-2018, 05:39 PM
  3. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  4. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  5. Replies: 0
    Last Post: 01-29-2014, 01:45 PM
  6. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  7. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM

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