Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Albie
 
Posts: n/a
Default 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   Report Post  
DOR
 
Posts: n/a
Default 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   Report Post  
Albie
 
Posts: n/a
Default 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


  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default Can I use a Reference inside a SUMIF or COUNTIF Function?

On Sun, 13 Nov 2005 13:50:06 -0800, "Albie"
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   Report Post  
Albie
 
Posts: n/a
Default 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"
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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 77
Default Can I use a Reference inside a SUMIF or COUNTIF Function?

I am trying to use a countif formula to count column a - rows 6-99 if
between10%and 25% AND if column b =DS.

can you help - i have tried the sumproduct - might not have the right
formula to put in but I tried and i have tried the function and several other
suggestions the help provided.

I would greatly appreciate it. Thanks

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Can I use a Reference inside a SUMIF or COUNTIF Function?

Try this:

=SUMPRODUCT(--(A6:A99=10%),--(A6:A99<=25%),--(B6:B99="DS"))

--
Biff
Microsoft Excel MVP


"Laura" wrote in message
...
I am trying to use a countif formula to count column a - rows 6-99 if
between10%and 25% AND if column b =DS.

can you help - i have tried the sumproduct - might not have the right
formula to put in but I tried and i have tried the function and several
other
suggestions the help provided.

I would greatly appreciate it. Thanks



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 77
Default Can I use a Reference inside a SUMIF or COUNTIF Function?

it works!!! Thank you so very much.

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A6:A99=10%),--(A6:A99<=25%),--(B6:B99="DS"))

--
Biff
Microsoft Excel MVP


"Laura" wrote in message
...
I am trying to use a countif formula to count column a - rows 6-99 if
between10%and 25% AND if column b =DS.

can you help - i have tried the sumproduct - might not have the right
formula to put in but I tried and i have tried the function and several
other
suggestions the help provided.

I would greatly appreciate it. Thanks




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Can I use a Reference inside a SUMIF or COUNTIF Function?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Laura" wrote in message
...
it works!!! Thank you so very much.

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A6:A99=10%),--(A6:A99<=25%),--(B6:B99="DS"))

--
Biff
Microsoft Excel MVP


"Laura" wrote in message
...
I am trying to use a countif formula to count column a - rows 6-99 if
between10%and 25% AND if column b =DS.

can you help - i have tried the sumproduct - might not have the right
formula to put in but I tried and i have tried the function and several
other
suggestions the help provided.

I would greatly appreciate it. Thanks






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Can I use a Reference inside a SUMIF or COUNTIF Function?


Hi Im having a similar issue, I'm trying to count numbers within a range and
then substract that number to another countif formula so something like this:

=COUNTIF('Data Report'!$N$14:$N$2857,"O-PFS"-(COUNTIF('Data
Report'!$O$14:$O$2857,"75<85")))

so N coulmn has codes like"o-pfs" and O columns has numbers, in a separate
sheet I need to count the number of N with "o-pfs" minus O column within 75
and 85..
does this make sense? my formula gives me 0 in return???
thanks




  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Can I use a Reference inside a SUMIF or COUNTIF Function?

=COUNTIF('Data Report'!$N$14:$N$2857,"O-PFS"-
(COUNTIF('Data Report'!$O$14:$O$2857,"75")-COUNTIF('Data
Report'!$O$14:$O$2857,"=85"))

--

HTH

Bob

"ginger82" wrote in message
...

Hi Im having a similar issue, I'm trying to count numbers within a range
and
then substract that number to another countif formula so something like
this:

=COUNTIF('Data Report'!$N$14:$N$2857,"O-PFS"-(COUNTIF('Data
Report'!$O$14:$O$2857,"75<85")))

so N coulmn has codes like"o-pfs" and O columns has numbers, in a separate
sheet I need to count the number of N with "o-pfs" minus O column within
75
and 85..
does this make sense? my formula gives me 0 in return???
thanks




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use the TODAY function with the SUMIF function? Lisa B. Excel Worksheet Functions 2 September 30th 05 08:51 PM
Could the "Criteria" in COUNTIF function be a cell reference? JohnSheenWSN Excel Worksheet Functions 2 June 16th 05 08:07 PM
MIN Function w/ variable address reference WLMPilot Excel Worksheet Functions 7 June 10th 05 07:56 PM
Lookup function returning reference, not value Caligula Excel Worksheet Functions 1 May 28th 05 06:35 PM
SUMIF function yak10 Excel Worksheet Functions 0 February 12th 05 05:12 PM


All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"