+ Reply to Thread
Results 1 to 4 of 4

Formula stops working when number is replaced with reference to cell containing same #

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    43

    Formula stops working when number is replaced with reference to cell containing same #

    I have a membership database including payment information on one tab of an excel file and statistics calculated on another tab. On my statistics tab, the below formula works perfectly.

    =COUNTIFS('Members 2013-14'!$C:$C,$A2,'Members 2013-14'!G:G,"<2500",'Members 2013-14'!G:G,">=1250")

    However the numbers "2500" and "1250" are subject to change from year to year. So that I won't have to edit the formula every year, I placed those numbers in cells B20 & B21 respectively and referenced the cells as below. The below formula counts all zeros.

    =COUNTIFS('Members 2013-14'!$C:$C,$A2,'Members 2013-14'!G:G,"<B20",'Members 2013-14'!G:G,">=21")

    Does anyone have any idea what is wrong?

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula stops working when number is replaced with reference to cell containing same #

    use

    =COUNTIFS('Members 2013-14'!$C:$C,$A2,'Members 2013-14'!G:G,"<"&B20,'Members 2013-14'!G:G,">="&B21)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-16-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formula stops working when number is replaced with reference to cell containing same #

    or try select all formula in the cell and do Ctrl + Shift + Enter

  4. #4
    Registered User
    Join Date
    02-20-2013
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Formula stops working when number is replaced with reference to cell containing same #

    Thank you, works perfectly. Are you able to explain to me why joining with an ampersand is necessary in this case?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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