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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum not working for range

Status
Not open for further replies.

xxentric

Technical User
Oct 14, 2009
35
0
0
US
Code:
=SUM(IF('C:\Documents and Settings\chipfab\Desktop\[test.xls]Sheet1'!$A$1:$A$9="12-1",1,0))


why will this only work if the value is in A1 ??? if its in A5 it returns 0 or false
 
You need to array-enter this formula (CTRL+SHIFT+ENTER).

combo
 
sweet that does work.. how come it wont stay? ex. if i then delete the value its looking for and reenter it, it loses its functionality and i have to edit cell and press ctrl+shift+enter again
 
Array formula has to be entered this way every time you edit the cell. So it could be easier to replace value (="12-1") by reference to other cell.

combo
 
an alternative to the array function (which actually works in the same way without needing ctrl+shift+ent) is
=sumproduct(--(A1:A9="12-1"))

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top