Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Cachod1
 
Posts: n/a
Default formula to count based on data in two different cells/columns

Column A has dates
Column B has one of 5 variables (LTF, WC, Exp, an "X", or is blank)

At the bottom of column B, I need to calculate the total number of cells
with "LTF, WC, or Exp" that have a date in column A that is equal to or less
than today's date.

What formula will do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default formula to count based on data in two different cells/columns

I mocked up data with dates in A2:A16 and LTF, WC, etc in B2:B16. Cell
A18 contains the "equal to or less than" date; A19:A23 contain the LTF,
WC, etc notations. The formula in cell B19 is
=SUMPRODUCT(--($A$18=$A$2:$A$16),--(A19=$B$2:$B$16))

Copy and paste that into B20:B23.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default formula to count based on data in two different cells/columns

Try this:

=SUMPRODUCT(--(A1:A100<=TODAY()),--(B1:B100="WTC"))+SUMPRODUCT(--(A1:A100<=TODAY()),--(B1:B100="LTF"))+SUMPRODUCT(--(A1:A100<=TODAY()),--(B1:B100="Exp"))

There may be a more efficient way to write this, but it should get the
results you're looking for.

HTH,
Elkar

"Cachod1" wrote:

Column A has dates
Column B has one of 5 variables (LTF, WC, Exp, an "X", or is blank)

At the bottom of column B, I need to calculate the total number of cells
with "LTF, WC, or Exp" that have a date in column A that is equal to or less
than today's date.

What formula will do this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default formula to count based on data in two different cells/columns

Try this:

=SUMPRODUCT((A1:A5<"")*(A1:A5<=TODAY())*(B1:B5={" wc","exp","ltf"}))

"Cachod1" wrote:

Column A has dates
Column B has one of 5 variables (LTF, WC, Exp, an "X", or is blank)

At the bottom of column B, I need to calculate the total number of cells
with "LTF, WC, or Exp" that have a date in column A that is equal to or less
than today's date.

What formula will do this?

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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Importing Data Into Formula Based Cells Heyna Excel Worksheet Functions 0 November 4th 04 09:05 PM
Count rows based on multiple criteria Murph Excel Worksheet Functions 1 October 28th 04 07:13 AM


All times are GMT +1. The time now is 09:49 PM.

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"