View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mark Bigelow Mark Bigelow is offline
external usenet poster
 
Posts: 55
Default sum with two conditions and a wildcard

Your best bet is probably an array formula. It may be cumbersome with
more than 20,000 lines of data, but you should be fine. Assuming the
column heading of the first column is in cell A1, this is the formula:

=SUM(IF(B2:B6=1, IF(LEFT(A2:A6, 5)="acc01", C2:C6, 0), 0))

Please let me know if that doesn't work.

Mark
---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!