Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUMIF Query

Status
Not open for further replies.

jode

Programmer
Aug 14, 2001
21
GB
Hi,

I have a spreadsheet and have had to use the SUMIF function for the 1st time, and so don't know if I am doing something wrong or if I have found a quirk!

Anyway, what I am trying to do is sum the values in column J if the values in D match.....

SUMIF($C$8:$C$25, D8, $J$8:$J$25)

My problem is that it is summing the values in K not in J...

Anyone any ideas???
 
Jode,

Im not sure if I understand correctly, but if I had two columns and I wanted to sum the maching coresponding values I would do an array formulas like this;

=SUM(IF($C$8:$C$25=$J$8:$J$25,$C$8:$C$25,0))

After putting the formula in make it and array by hitting CTRL+SHIFT_ENTER at the end of the formula.

Hope this helps,

Regards,

Wray
 
Bizarre - if the formula that you've is exactly the same as in the spreadsheet - I've never seen that before.....
Try selecting the cell and then pressing F2 and then return - see if it re-calculates...

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
There I go not reading the entire post again, didnt see that you were having a difficulty with it summing the wrong range. That is indeed strange, I would go with Geoff with seeing if it will recalulate, or maybe do a copy paste special values and formulas to a new sheet to see if maybe there is some corruption in the sheet.

Regards,

Wray
 
xlbo - apologies - it was meant to say

SUMIF($C$8:$J$25, D8, $J$8:$J$25)

The initial range was slightly wrong, but yes it is very bizarre.
I have solved the problem just by using an array formula as below, but I still feel I should have been able to use a SUMIF!


{=SUM(IF($C$8:$J$17=D8,$J$8:$J$17))}


 
Eh ? - your 1st formula was fine - your second should get you a circular reference (cos of the C1:J25 in the 1st argument)

Feel free to send me the workbook - I'll have a quick look:
Geoff.Barraclough@Punchpubs.co.uk

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top