Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default COUNTIF with 2 conditions/columns

I'm struggling to make that one work, it's returning "-" in every line.
I'm actually using a reference to a cell instead of the text "Wednesday"
and suspect thats the issue.


2 possibilities that I can think of:
1. The data in col D are text numbers or a mix of text/real numbers
2. The cell that you're pointing col B to (eg: E1) contains an input
which has extraneous white spaces that's throwing the matching off

Try this revised version:
=SUMPRODUCT((C2:C10="Rainy")*(B2:B10=TRIM(E1)),D2: D10+0)

1. The addition of a zero in: D2:D10+0
will coerce all text numbers (if any) to real numbers
2. Using TRIM around the input cell E1 in: B2:B10=TRIM(E1)
will remove any extraneous white spaces (leading/trailing spaces)
inadvertently keyed in
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
Countif depending on the conditions across multiple columns san Excel Worksheet Functions 1 May 20th 08 11:28 AM
Using countif with 2 conditions Cheryl W Excel Worksheet Functions 2 September 14th 05 03:38 PM
COUNTIF 2 conditions Sojo Excel Worksheet Functions 2 June 29th 05 08:37 PM
COUNTIF for 2 conditions Bruce Excel Worksheet Functions 4 June 15th 05 01:22 PM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"