Help with countif function

  • Thread starter Thread starter David Goodall
  • Start date Start date
D

David Goodall

Hi
I've created a very simple formula using countif.

=(COUNTIF('Sheet1'!$D$4:$D$4000,1))

Adjacent to column A where "1" appears I have a another number which I would
like to find a total for.


Column A Column D

1 10
2 5
3 2
1 15
2 23
4 1
5 12

So in this case 1's total would be 25 and it appears twice which I have
determined from the countif function.

Hope this makes sense.

Many thanks
David
 
Hi David!

Try:

=SUMIF(Sheet1!$A$4:$A$4000,1,Sheet1!$D$4:$D$4000)

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
You just need SUMIF not COUNTIF

=sumif(range,criteria,sum_range)

range = A4:A4000
criteria = 1
sum_range = D4:D4000
 
Many thanks

Ken Wright said:
You just need SUMIF not COUNTIF

=sumif(range,criteria,sum_range)

range = A4:A4000
criteria = 1
sum_range = D4:D4000

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

-------------------------------------------------------------------------- --
It's easier to beg forgiveness than ask permission :-)
-------------------------------------------------------------------------- --
 
Back
Top