Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default CONCATENATE and SUMPRODUCT in a formula??

The followign formula returns a #VALUE! error:
=CONCATENATE(SUMPRODUCT(--(C$2:C$996="Aug"),--(YEAR(D$2:D$996="2006"))," 2006
August transactions"))

The intent here is to count all August 2006 transactions and display the
count as a text string: "XX August 2006 transactions"

Seems like it is pretty simple to do this and that the above formula should
do this. But it doesn't. So, thoughts?

C2:C996 is calculated off D2:D996 with the formula
=IF(ISBLANK(H2),"",TEXT(D2,"mmm")) filled down to the end of the range. (H2
is a transaction amount or else blank.)

D2:D996 is a date, formatted mm/dd/yy, as in 8/14/2006

Here's the weird part: when I change the formula to
=CONCATENATE(SUMPRODUCT(--(C$2:C$996="Aug"),--(B$2:B$996="2006"))," 2006
August transactions") the count returned is 0. In this case B2:B996 is
calculated based on the formula =IF(ISBLANK(H2),"",YEAR(D2)). See above for
an explanation of H2 and D2.

Finally, =CONCATENATE(COUNTIF(C$2:C$996,"Aug")," August transactions") works
perfectly. The problem here, of course, is that this formula does not
distinguish among 2005, 2006, 2007, etc.

So, maybe I've had too much to drink but I'm missing something here. How do
I get the first formula to distinguish among, say, August 2006 transactions
and August 2005 transactions? All I'm looking for is a count of a year/month
combo number of transactions expressed in a concatenated text string.

Dave

--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default CONCATENATE and SUMPRODUCT in a formula??

you messed up with the syntax

Here is the correct formula

=CONCATENATE(SUMPRODUCT(--(C2:C996="Aug"),--(YEAR(D2:D996)=2006))," 2006
August transactions")


"Dave F" wrote:

The followign formula returns a #VALUE! error:
=CONCATENATE(SUMPRODUCT(--(C$2:C$996="Aug"),--(YEAR(D$2:D$996="2006"))," 2006
August transactions"))

The intent here is to count all August 2006 transactions and display the
count as a text string: "XX August 2006 transactions"

Seems like it is pretty simple to do this and that the above formula should
do this. But it doesn't. So, thoughts?

C2:C996 is calculated off D2:D996 with the formula
=IF(ISBLANK(H2),"",TEXT(D2,"mmm")) filled down to the end of the range. (H2
is a transaction amount or else blank.)

D2:D996 is a date, formatted mm/dd/yy, as in 8/14/2006

Here's the weird part: when I change the formula to
=CONCATENATE(SUMPRODUCT(--(C$2:C$996="Aug"),--(B$2:B$996="2006"))," 2006
August transactions") the count returned is 0. In this case B2:B996 is
calculated based on the formula =IF(ISBLANK(H2),"",YEAR(D2)). See above for
an explanation of H2 and D2.

Finally, =CONCATENATE(COUNTIF(C$2:C$996,"Aug")," August transactions") works
perfectly. The problem here, of course, is that this formula does not
distinguish among 2005, 2006, 2007, etc.

So, maybe I've had too much to drink but I'm missing something here. How do
I get the first formula to distinguish among, say, August 2006 transactions
and August 2005 transactions? All I'm looking for is a count of a year/month
combo number of transactions expressed in a concatenated text string.

Dave

--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default CONCATENATE and SUMPRODUCT in a formula??

Duh, I should have caught that one. Thinking too hard here.

Thanks.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Teethless mama" wrote:

you messed up with the syntax

Here is the correct formula

=CONCATENATE(SUMPRODUCT(--(C2:C996="Aug"),--(YEAR(D2:D996)=2006))," 2006
August transactions")


"Dave F" wrote:

The followign formula returns a #VALUE! error:
=CONCATENATE(SUMPRODUCT(--(C$2:C$996="Aug"),--(YEAR(D$2:D$996="2006"))," 2006
August transactions"))

The intent here is to count all August 2006 transactions and display the
count as a text string: "XX August 2006 transactions"

Seems like it is pretty simple to do this and that the above formula should
do this. But it doesn't. So, thoughts?

C2:C996 is calculated off D2:D996 with the formula
=IF(ISBLANK(H2),"",TEXT(D2,"mmm")) filled down to the end of the range. (H2
is a transaction amount or else blank.)

D2:D996 is a date, formatted mm/dd/yy, as in 8/14/2006

Here's the weird part: when I change the formula to
=CONCATENATE(SUMPRODUCT(--(C$2:C$996="Aug"),--(B$2:B$996="2006"))," 2006
August transactions") the count returned is 0. In this case B2:B996 is
calculated based on the formula =IF(ISBLANK(H2),"",YEAR(D2)). See above for
an explanation of H2 and D2.

Finally, =CONCATENATE(COUNTIF(C$2:C$996,"Aug")," August transactions") works
perfectly. The problem here, of course, is that this formula does not
distinguish among 2005, 2006, 2007, etc.

So, maybe I've had too much to drink but I'm missing something here. How do
I get the first formula to distinguish among, say, August 2006 transactions
and August 2005 transactions? All I'm looking for is a count of a year/month
combo number of transactions expressed in a concatenated text string.

Dave

--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.

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
help with formula...if -- concatenate sedonovan Excel Discussion (Misc queries) 1 June 22nd 06 12:31 PM
Need help with concatenate formula Terri Excel Worksheet Functions 4 March 29th 06 11:47 PM
Need help with concatenate formula Terri Excel Worksheet Functions 4 March 29th 06 10:52 PM
Concatenate in a formula Jordan Excel Worksheet Functions 1 December 5th 05 05:11 PM
Evaluating results of a concatenate formula, as a formula dodger Excel Worksheet Functions 5 September 9th 05 01:55 PM


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