+ Reply to Thread
Results 1 to 5 of 5

Use Value from separate cell in COUNTIF formula

  1. #1
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Use Value from separate cell in COUNTIF formula

    Hello Excel friends,

    This formula works:
    =COUNTIFS(ED_Date,">"&$F$1,ED_TO,&"<>")

    This formula does not:
    =COUNTIFS($A$1&_Date,">"&$F$1,$A$1&_TO,&"<>")

    {cell A1 = ED} "ED_Date" and "ED_TO" are range names.

    Please tell me how I can get the value from A1 and use it in my formula.
    I need this to permit the regular changing of the value in A1.

    Thanks in advance!

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: Use Value from separate cell in COUNTIF formula

    try:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    09-11-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2013
    Posts
    103

    Re: Use Value from separate cell in COUNTIF formula

    Add "" for your text, then for name range, have to use Indirect.

    This formula works:
    =COUNTIFS(ED_Date,">"&$F$1,ED_TO,&"<>")

    This formula does not:
    =COUNTIFS($A$1&"_Date",">"&$F$1,Indirect($A$1&"_TO"),&"<>")
    Click * to reward me...
    Thank you...

  4. #4
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Re: Use Value from separate cell in COUNTIF formula

    Thanks, I guess I just haven't used INDIRECT in so long I forgot its purpose.
    Have a great day!

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Use Value from separate cell in COUNTIF formula

    The INDIRECT function converts the text string $A$1&_Date that is in your formula that doesn't work into a REFERENCE that Excel can use which in this case is a named range.

    Maybe this will help in understanding:

    A
    B
    C
    D
    E
    1
    Named Ranges
    NAME:
    joe
    2
    Ed
    Joe
    3
    1
    2
    Sum
    4
    2
    4
    30
    =SUM(INDIRECT(E1))
    5
    3
    6
    0
    =SUM(E1)
    6
    4
    8
    7
    5
    10
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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 return value of cell relative to another cell in separate worksheet
    By jakevogel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2016, 12:41 PM
  2. [SOLVED] Excel2010 IF Formula to return value based on a separate date and two separate text values
    By jakecutler in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2015, 03:24 AM
  3. Replies: 12
    Last Post: 08-05-2014, 03:45 PM
  4. Replies: 5
    Last Post: 11-21-2013, 06:00 PM
  5. [SOLVED] Formula to separate text in cell
    By Steph in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-20-2005, 07:05 PM
  6. How do I set up an array using countif for 2 separate arguments.
    By crich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Countif in two separate columns?
    By robcunliffe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-14-2005, 12:40 PM

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