View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count and Sum of cells if conditions fulfilled

Pressed the "Yes" button, thanks for help.
Welcome, and thanks

What if the column B is text... any solution in that case?

Equating to Text/text numbers requires double quotes, eg: ="Yes", ="25"

If you have mixed data (real numbers & text numbers) in col B
you could use either:

=SUMPRODUCT((B2:B100+0=25)*(A2:A100="Yes"))
where the +0 will coerce any text nums in col B to real nums, w/o impacting
any existing real nums

Or (the other way around):
=SUMPRODUCT((B2:B100&""="25")*(A2:A100="Yes"))
where the &"" will change any real nums in col B to text nums, w/o impacting
any existing text nums
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:365 Subscribers:65
xdemechanik
---