#1   Report Post  
shmurphing
 
Posts: n/a
Default complex formula

Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then count
the cells the ALSO are less than a specific date. The count at the end will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
if you also want to count values which only have for example 'one' as part
of the first column (e.g. 'this is one') then use
=SUMPRODUCT(--ISNUMBER(SEARCH("one",A1:A100)),--ISNUMBER(SEARCH("two",B1:B100)),--(C1:C100<DATE(2004,12,1)))

If one or two have to be the complete entry of the cell use
=SUMPRODUCT(--(A1:A100="one"),--(B1:B100="two"),--(C1:C100<DATE(2004,12,1)))

Also see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards
Frank Kabel
Frankfurt, Germany
"shmurphing" schrieb im Newsbeitrag
...
Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then
count
the cells the ALSO are less than a specific date. The count at the end
will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!



  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=SUMPRODUCT(--(A2:A200="One"),--(B2:B200="Two"),--(C2:C200<DATE(2004,12,1)))


this assumes that One and Two are alone in their cells and not part of a
larger text string and that the dates in C (or whatever column holds the
dates) are real dates and not text

Regards,

Peo Sjoblom

"shmurphing" wrote:

Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then count
the cells the ALSO are less than a specific date. The count at the end will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!

  #4   Report Post  
Domenic
 
Posts: n/a
Default

Try the following...

=SUMPRODUCT(--(A1:A10="one"),--(B1:B10="two"),--(C1:C10<DATE(2004,12,1)))

Hope this helps!

In article ,
"shmurphing" wrote:

Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then count
the cells the ALSO are less than a specific date. The count at the end will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!

  #5   Report Post  
Patrick G
 
Posts: n/a
Default

I like this formula, but I have never seen the "--" notation before. What is
this used for? Somehow it changes the formula to a numeric output? Please
explain.. for these curious people!

Thanks,
Patrick G

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(--(A2:A200="One"),--(B2:B200="Two"),--(C2:C200<DATE(2004,12,1)))


this assumes that One and Two are alone in their cells and not part of a
larger text string and that the dates in C (or whatever column holds the
dates) are real dates and not text

Regards,

Peo Sjoblom

"shmurphing" wrote:

Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then count
the cells the ALSO are less than a specific date. The count at the end will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

=Sumproduct()
likes to work with numbers.

a2:A200="one"
will be 198 true/falses.

the rightmost minus (in the double minus) will convert true/falses to -1/0's,
then the leftmost will change the -1 to +1.

J.E. McGimpsey has notes at:
http://www.mcgimpsey.com/excel/formulae/doubleneg.html




Patrick G wrote:

I like this formula, but I have never seen the "--" notation before. What is
this used for? Somehow it changes the formula to a numeric output? Please
explain.. for these curious people!

Thanks,
Patrick G

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(--(A2:A200="One"),--(B2:B200="Two"),--(C2:C200<DATE(2004,12,1)))


this assumes that One and Two are alone in their cells and not part of a
larger text string and that the dates in C (or whatever column holds the
dates) are real dates and not text

Regards,

Peo Sjoblom

"shmurphing" wrote:

Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then count
the cells the ALSO are less than a specific date. The count at the end will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!


--

Dave Peterson
  #7   Report Post  
shmurphing
 
Posts: n/a
Default

Wow! This works great. Think I should be able to take care of the rest of
the spreadsheet with ease.

Thank you - Happy Holidays!

"shmurphing" wrote:

Can anyone tell me how to performt he following?

I want to count the cells in column A that contain the word "One" and then
count the cells in column B that ALSO contain the word "Two" and then count
the cells the ALSO are less than a specific date. The count at the end will
indicate that the row had one, two, and was less than dec 1, 2004.

Help!

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
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
How do I use Range Names listed in a VLookup table in a formula? Essbasedvlpr32 Excel Worksheet Functions 3 December 15th 04 10:11 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM
Complex formula help needed Jan Excel Worksheet Functions 0 November 9th 04 03:19 PM


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

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

About Us

"It's about Microsoft Excel"