+ Reply to Thread
Results 1 to 5 of 5

Can I use a Reference inside a SUMIF or COUNTIF Function?

  1. #1
    Albie
    Guest

    Can I use a Reference inside a SUMIF or COUNTIF Function?

    I am trying to utilize a SUMIF function that references a cell to provide the
    the criteria, so that I can changed the criteria inside a optimization or
    scenario. My functions are all returning zero when I use the cell reference,
    but when I use the actual value, it returns what it should? Any way I can
    get around this?

  2. #2
    DOR
    Guest

    Re: Can I use a Reference inside a SUMIF or COUNTIF Function?

    It should work properly if you are looking for an equal condition.
    However, if you are looking for >,<,or <>, then you need something like

    =SUMIF(CritRange,">"&A1,SumRange)

    where your criterion value is in A1, if you are looking for an
    inequality. You put whatever inequality sign you need between the
    quotes.

    HTH

    DOR


  3. #3
    Ron Rosenfeld
    Guest

    Re: Can I use a Reference inside a SUMIF or COUNTIF Function?

    On Sun, 13 Nov 2005 13:50:06 -0800, "Albie" <[email protected]>
    wrote:

    >I am trying to utilize a SUMIF function that references a cell to provide the
    >the criteria, so that I can changed the criteria inside a optimization or
    >scenario. My functions are all returning zero when I use the cell reference,
    >but when I use the actual value, it returns what it should? Any way I can
    >get around this?


    It's just a syntax issue:

    =SUMIF(rng_to_check, "=" & cell_ref, rng_to_sum)




    --ron

  4. #4
    Albie
    Guest

    Re: Can I use a Reference inside a SUMIF or COUNTIF Function?

    Thanks! Works wonders!

    "Ron Rosenfeld" wrote:

    > On Sun, 13 Nov 2005 13:50:06 -0800, "Albie" <[email protected]>
    > wrote:
    >
    > >I am trying to utilize a SUMIF function that references a cell to provide the
    > >the criteria, so that I can changed the criteria inside a optimization or
    > >scenario. My functions are all returning zero when I use the cell reference,
    > >but when I use the actual value, it returns what it should? Any way I can
    > >get around this?

    >
    > It's just a syntax issue:
    >
    > =SUMIF(rng_to_check, "=" & cell_ref, rng_to_sum)
    >
    >
    >
    >
    > --ron
    >


  5. #5
    Albie
    Guest

    Re: Can I use a Reference inside a SUMIF or COUNTIF Function?

    Thanks! Works great. I was suspecting syntax but as usual, the help files
    didn't help

    "DOR" wrote:

    > It should work properly if you are looking for an equal condition.
    > However, if you are looking for >,<,or <>, then you need something like
    >
    > =SUMIF(CritRange,">"&A1,SumRange)
    >
    > where your criterion value is in A1, if you are looking for an
    > inequality. You put whatever inequality sign you need between the
    > quotes.
    >
    > HTH
    >
    > DOR
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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