Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Compare the value of one cell to 2 different cells

Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is = B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Compare the value of one cell to 2 different cells

On Fri, 2 Jan 2009 11:40:01 -0800, NeedExcelHelp
wrote:

Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is = B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008



Try this formula in cell C1:

=SUMPRODUCT((A1:A5=B1)*(A1:A5<=B2))

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Compare the value of one cell to 2 different cells

Try this:

=SUMPRODUCT(--(A1:A5=B1),--(A1:A5<=B2))

HTH
Elkar


"NeedExcelHelp" wrote:

Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is = B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Compare the value of one cell to 2 different cells

Try this:

=SUMPRODUCT(--(A1:A5=B1),--(A1:A5<=B2))

--
Biff
Microsoft Excel MVP


"NeedExcelHelp" wrote in message
...
Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is = B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Compare the value of one cell to 2 different cells

Hi,

And if your in 2007 you can also use

=COUNTIFS(A1:A12,"="&B1,A1:A12,"<="&B2)

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"NeedExcelHelp" wrote:

Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is = B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008



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
Compare two cells, if equal move a third cell to another cell Mike Excel Discussion (Misc queries) 3 December 30th 08 07:26 PM
Compare a cell to a range of cells? Cam Excel Discussion (Misc queries) 2 January 24th 08 05:35 AM
Compare two Cells and highlight third cell Timmy Excel Worksheet Functions 3 November 21st 07 08:38 PM
Compare two cells and return certain value in third cell hurairah Excel Worksheet Functions 3 July 19th 06 03:44 AM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM


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