#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sumproduct

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3 letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on 6/1
would only count 1 entry.

Thanks for any help

SPB


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sumproduct

This just gives me a blank or a 1 not a total of the orrurances of the dates
what have "SPB"
any other ideas

"Don Guillett" wrote:

One way
=if(SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))0,1,"")--Don GuillettMicrosoft MVP ExcelSalesAid "Excel 2007 - SPB" wrote in ...I have the following formula =SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB")) Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3 letterid This works fine, but How do I "Count" dates ONCE i.e. two entries on 6/1 would only count 1 entry. Thanks for any help SPB

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Sumproduct

Your code should count multiple dates without any changes provided the number
of rows in LDatein and the number of rows in LPilot covers the number of rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3 letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on 6/1
would only count 1 entry.

Thanks for any help

SPB


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sumproduct

Thanks

The formula does count, but it counts all the entries (5 in the example below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick matches the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the number
of rows in LDatein and the number of rows in LPilot covers the number of rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3 letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on 6/1
would only count 1 entry.

Thanks for any help

SPB




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Sumproduct

I would use a Helper Column - say Column C with the formula in C2:

=COUNTIF($A$2:A2,A2)

Copied down on the fill handle to C6. This will produce a 1 for the 1st
instance of any date. and a larger number for subsequent duplicates.

Then the formula:

=SUMPRODUCT(((TEXT(A2:A6,"mmyy")=TEXT(D1,"mmyy"))* (B2:B6="spb")*(C2:C6=1)))

Returns 3

Substitute your range names for the ranges.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Excel 2007 - SPB" wrote in message
...
Thanks

The formula does count, but it counts all the entries (5 in the example
below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick matches
the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the
number
of rows in LDatein and the number of rows in LPilot covers the number of
rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3
letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on
6/1
would only count 1 entry.

Thanks for any help

SPB





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Sumproduct

The *Helper Column* can of course be hidden.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Sandy Mann" wrote in message
...
I would use a Helper Column - say Column C with the formula in C2:

=COUNTIF($A$2:A2,A2)

Copied down on the fill handle to C6. This will produce a 1 for the 1st
instance of any date. and a larger number for subsequent duplicates.

Then the formula:

=SUMPRODUCT(((TEXT(A2:A6,"mmyy")=TEXT(D1,"mmyy"))* (B2:B6="spb")*(C2:C6=1)))

Returns 3

Substitute your range names for the ranges.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Excel 2007 - SPB" wrote in
message ...
Thanks

The formula does count, but it counts all the entries (5 in the example
below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick matches
the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the
number
of rows in LDatein and the number of rows in LPilot covers the number of
rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3
letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on
6/1
would only count 1 entry.

Thanks for any help

SPB








  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Sumproduct

You had a very simple error. Your dates are "mmyy" which is why you are
getting a 5. the code is only looking at month and year

replace in two places
from
" mmyy"
to
"ddmmyy"

"Excel 2007 - SPB" wrote:

Thanks

The formula does count, but it counts all the entries (5 in the example below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick matches the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the number
of rows in LDatein and the number of rows in LPilot covers the number of rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3 letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on 6/1
would only count 1 entry.

Thanks for any help

SPB


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct

Try this array formula** :

=COUNT(1/FREQUENCY(IF((TEXT(LDatein,"mmyy")=TEXT(FM4,"mmyy" ))*(LPilot="SPB"),MATCH(LDatein,LDatein,0)),ROW(LD atein)-MIN(ROW(LDatein))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Excel 2007 - SPB" wrote in message
...
Thanks

The formula does count, but it counts all the entries (5 in the example
below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick matches
the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the
number
of rows in LDatein and the number of rows in LPilot covers the number of
rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3
letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on
6/1
would only count 1 entry.

Thanks for any help

SPB




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sumproduct

Thanks , works perfectly!

"T. Valko" wrote:

Try this array formula** :

=COUNT(1/FREQUENCY(IF((TEXT(LDatein,"mmyy")=TEXT(FM4,"mmyy" ))*(LPilot="SPB"),MATCH(LDatein,LDatein,0)),ROW(LD atein)-MIN(ROW(LDatein))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Excel 2007 - SPB" wrote in message
...
Thanks

The formula does count, but it counts all the entries (5 in the example
below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick matches
the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the
number
of rows in LDatein and the number of rows in LPilot covers the number of
rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3
letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on
6/1
would only count 1 entry.

Thanks for any help

SPB







  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Excel 2007 - SPB" wrote in message
...
Thanks , works perfectly!

"T. Valko" wrote:

Try this array formula** :

=COUNT(1/FREQUENCY(IF((TEXT(LDatein,"mmyy")=TEXT(FM4,"mmyy" ))*(LPilot="SPB"),MATCH(LDatein,LDatein,0)),ROW(LD atein)-MIN(ROW(LDatein))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Excel 2007 - SPB" wrote in
message
...
Thanks

The formula does count, but it counts all the entries (5 in the example
below)
Yes, Both columns have the same number of rows
I would like the count to only count on instance of a date whick
matches
the
Lpilot column
i.e.
date Lpilot
6/1/08 spb
6/1/08 spb
6/2/08 spb
6/2/08 spb
6/3/08 spb

should = 3

"Joel" wrote:

Your code should count multiple dates without any changes provided the
number
of rows in LDatein and the number of rows in LPilot covers the number
of
rows
you want to add.

"Excel 2007 - SPB" wrote:

I have the following formula

=SUMPRODUCT(--(TEXT(LDatein,"mmyy")=TEXT($FM$4,"mmyy"))*(LPilot= "SPB"))
Ldatein is a column with a date entry, FM4 is a date, LPilot is a 3
letter id

This works fine, but How do I "Count" dates ONCE i.e. two entries on
6/1
would only count 1 entry.

Thanks for any help

SPB







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
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
Sumproduct Naraine Ramkirath Excel Worksheet Functions 3 May 17th 07 04:58 PM
If and Sumproduct ronnomad Excel Discussion (Misc queries) 2 May 10th 07 07:50 PM
sumproduct? anand Excel Worksheet Functions 2 December 11th 05 09:12 AM
SUMPRODUCT Jim Excel Worksheet Functions 1 November 11th 05 04:58 AM


All times are GMT +1. The time now is 10:02 PM.

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"