Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default count if for 2 conditions


I am trying to create a formula and have had no success in checking 2
different colums for certian text. If both colums/boxes match, then 1 if not
then don't count. I have tried sumiif, count if, counta, sumproduct with no
luck. Does anyone have any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default count if for 2 conditions

If you are using Excel 2003 I believe the only one that will work is
sumproduct; but it can do pretty much anything, however, it can be a
little tricky. Provide some more information please.

Ken

On Jun 26, 5:05*pm, AwesomeSean
wrote:
I am trying to create a formula and have had no success in checking 2
different colums for certian text. If both colums/boxes match, then 1 if not
then don't count. I have tried sumiif, count if, counta, sumproduct with no
luck. Does anyone have any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default count if for 2 conditions



You've under-described your problem, in that it's not clear if you are
looking for exactly the same text in the two cells or looking for the
same sub-string in two cells.

If it's the exact same text, use Excel's Exact function

=If(Exact(A1, B1),"I knew they were the same!", "Busted again...")

If it is the presence of a substring in two cells, things get a bit
messier, but this should work:

=IF(NOT(OR(ISERROR(FIND("OK",A1)),ISERROR(FIND("OK ",B1)))),"'Twas there
all along", "Quoth the raven: Nevermore!")

or

=IF(AND(NOT(ISERROR(FIND("OK",A1))),NOT(ISERROR(FI ND("OK",B1)))),"'Twas
there all along", "Quoth the raven: Nevermore!")

note that instead of having the string "OK" in the cell formulas, you
could have it in another cell - say A3 and then use A3 in the place of
"OK" in the formulas above. AND also note that Find is case-sensitive,
so you might want to throw in an UPPER() around any string or the name
of any cell that contains a string.

The latter two are pretty ugly cell formulas - it wouldn't surprise me
if someone came up with something more elegant...

Good luck! :Bgr


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=110590

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default count if for 2 conditions


I actually figured it out. Here is what I did.
=SUMPRODUCT((Monday!$C2:$C154="Scheduled")*(Monday !$D2:$D154="Rescheduled"))

All I wanted to do was have excel return me a 1 if it was true and do
nothing if it was false so with this i am looking in 2 different colums.
Column A should say "scheduled" and column b should say "Rescheduled" and if
they do then count 1

I tried all day to figure this out and actually what i was doing wrong is i
was trying to look at the whole column which this formula will not do.
As soon as i gave it a range, BINGO. It worked. I hope this helps someone
else out having this same concern.

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
Count but with conditions v!v Excel Worksheet Functions 7 August 30th 08 02:38 AM
Count if - 2 conditions orquidea Excel Discussion (Misc queries) 7 February 5th 08 07:52 PM
Count with 2 conditions, second one OR [email protected] Excel Worksheet Functions 2 June 4th 06 05:55 PM
How to count after 2 conditions are met Dave Schwinger Excel Worksheet Functions 3 April 3rd 06 09:29 PM
Count with 2 conditions? Lee Excel Worksheet Functions 2 March 19th 05 02:45 AM


All times are GMT +1. The time now is 04:09 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"