Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
pomalley
 
Posts: n/a
Default Wildcards with SumProduct

I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card to
search/find all dept names that start with USA? I've tried using LEFT with 3
characters designated, but SUMPRODUCT doesn't seem to like it much.

=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200))

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...
I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card

to
search/find all dept names that start with USA? I've tried using LEFT

with 3
characters designated, but SUMPRODUCT doesn't seem to like it much.


=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)



  #3   Report Post  
pomalley
 
Posts: n/a
Default

Pretty terrific stuff. Now, let's suppose that the month is really a date.
I added a column with the month in it as text, but I'd like to avoid having
to do that. Rather I'd like to perform the same operation but instead, ask
it to locate only records within the month of January. In other words, there
are 10 entries, each with a different January day of the month. Any
suggestions. Thanks again.

"Bob Phillips" wrote:

=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...
I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card

to
search/find all dept names that start with USA? I've tried using LEFT

with 3
characters designated, but SUMPRODUCT doesn't seem to like it much.


=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)




  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=SUMPRODUCT(--(LEFT($W$3:$W$200,3)=A3),--(DATE(YEAR($U$3:$U$200),MONTH($U$3:$U$200),1)=B3), $X$3:$X$200)

where A3 houses a value like USA and B3 a month/year date set to its
first day, e.g., 1-Feb-2004.

pomalley wrote:
Pretty terrific stuff. Now, let's suppose that the month is really a date.
I added a column with the month in it as text, but I'd like to avoid having
to do that. Rather I'd like to perform the same operation but instead, ask
it to locate only records within the month of January. In other words, there
are 10 entries, each with a different January day of the month. Any
suggestions. Thanks again.

"Bob Phillips" wrote:


=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...

I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card


to

search/find all dept names that start with USA? I've tried using LEFT


with 3

characters designated, but SUMPRODUCT doesn't seem to like it much.



=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)



  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Uum, isn't that what it already does?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...
Pretty terrific stuff. Now, let's suppose that the month is really a

date.
I added a column with the month in it as text, but I'd like to avoid

having
to do that. Rather I'd like to perform the same operation but instead,

ask
it to locate only records within the month of January. In other words,

there
are 10 entries, each with a different January day of the month. Any
suggestions. Thanks again.

"Bob Phillips" wrote:


=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...
I'm using the following formula, but need to select groups whose names

all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start

with
USA. Additionally, the sum should be for those dept's who have

activity
during a particular month like Jan. Is there a way to include a wild

card
to
search/find all dept names that start with USA? I've tried using LEFT

with 3
characters designated, but SUMPRODUCT doesn't seem to like it much.



=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)








  #6   Report Post  
pomalley
 
Posts: n/a
Default

I'm having difficulty with your equation. I'm not clear about the date
string. Using this function results in a #VALUE error. I was careful to
format the b3 cell as indicated in your note, but it still results in the
error. What does the 1 identify, is that for first month, first day of
month? Any suggestions you have are greatly appreciated.

"Aladin Akyurek" wrote:

=SUMPRODUCT(--(LEFT($W$3:$W$200,3)=A3),--(DATE(YEAR($U$3:$U$200),MONTH($U$3:$U$200),1)=B3), $X$3:$X$200)

where A3 houses a value like USA and B3 a month/year date set to its
first day, e.g., 1-Feb-2004.

pomalley wrote:
Pretty terrific stuff. Now, let's suppose that the month is really a date.
I added a column with the month in it as text, but I'd like to avoid having
to do that. Rather I'd like to perform the same operation but instead, ask
it to locate only records within the month of January. In other words, there
are 10 entries, each with a different January day of the month. Any
suggestions. Thanks again.

"Bob Phillips" wrote:


=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...

I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card

to

search/find all dept names that start with USA? I've tried using LEFT

with 3

characters designated, but SUMPRODUCT doesn't seem to like it much.



=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)




  #7   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Lets say that the condition month is 1, meaning January. Lets also
suppose that the year is 2005. In B3 enter:

1/1/2005

The condition date is thus set to the first day date of the Jan-2005.

pomalley wrote:
I'm having difficulty with your equation. I'm not clear about the date
string. Using this function results in a #VALUE error. I was careful to
format the b3 cell as indicated in your note, but it still results in the
error. What does the 1 identify, is that for first month, first day of
month? Any suggestions you have are greatly appreciated.

"Aladin Akyurek" wrote:


=SUMPRODUCT(--(LEFT($W$3:$W$200,3)=A3),--(DATE(YEAR($U$3:$U$200),MONTH($U$3:$U$200),1)=B3), $X$3:$X$200)

where A3 houses a value like USA and B3 a month/year date set to its
first day, e.g., 1-Feb-2004.

pomalley wrote:

Pretty terrific stuff. Now, let's suppose that the month is really a date.
I added a column with the month in it as text, but I'd like to avoid having
to do that. Rather I'd like to perform the same operation but instead, ask
it to locate only records within the month of January. In other words, there
are 10 entries, each with a different January day of the month. Any
suggestions. Thanks again.

"Bob Phillips" wrote:



=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...


I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card

to


search/find all dept names that start with USA? I've tried using LEFT

with 3


characters designated, but SUMPRODUCT doesn't seem to like it much.



=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)




  #8   Report Post  
pomalley
 
Posts: n/a
Default

Well, it works like a charm. I still would like to contain the query within
the string rather than create columns of sort criteria, but this will work
nicely. Thanks again for all your help.

"Aladin Akyurek" wrote:

Lets say that the condition month is 1, meaning January. Lets also
suppose that the year is 2005. In B3 enter:

1/1/2005

The condition date is thus set to the first day date of the Jan-2005.

pomalley wrote:
I'm having difficulty with your equation. I'm not clear about the date
string. Using this function results in a #VALUE error. I was careful to
format the b3 cell as indicated in your note, but it still results in the
error. What does the 1 identify, is that for first month, first day of
month? Any suggestions you have are greatly appreciated.

"Aladin Akyurek" wrote:


=SUMPRODUCT(--(LEFT($W$3:$W$200,3)=A3),--(DATE(YEAR($U$3:$U$200),MONTH($U$3:$U$200),1)=B3), $X$3:$X$200)

where A3 houses a value like USA and B3 a month/year date set to its
first day, e.g., 1-Feb-2004.

pomalley wrote:

Pretty terrific stuff. Now, let's suppose that the month is really a date.
I added a column with the month in it as text, but I'd like to avoid having
to do that. Rather I'd like to perform the same operation but instead, ask
it to locate only records within the month of January. In other words, there
are 10 entries, each with a different January day of the month. Any
suggestions. Thanks again.

"Bob Phillips" wrote:



=SUMPRODUCT(--(LEFT($w$3:$w$200,3)="USA"),--(TEXT($U$3:$U$200,"mmm")="Jan"),
$X$3:$X$200)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"pomalley" wrote in message
...


I'm using the following formula, but need to select groups whose names all
start with USA but end with different dept names, such as USA-Travel,
USA-Resort, USA-Hotel. There are approximately 10 dept's that start with
USA. Additionally, the sum should be for those dept's who have activity
during a particular month like Jan. Is there a way to include a wild card

to


search/find all dept names that start with USA? I've tried using LEFT

with 3


characters designated, but SUMPRODUCT doesn't seem to like it much.



=SUMPRODUCT(--($w$3:$w$200="USA-Travel"),--($U$3:$U$200="Jan"),($X$3:$X$200)
)





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 Peter B Excel Worksheet Functions 1 March 7th 05 01:59 PM
sumproduct causing memory errors? dave Excel Worksheet Functions 1 March 3rd 05 09:31 AM
Can I reference =, <, or > sign in SUMPRODUCT BobT Excel Discussion (Misc queries) 7 February 16th 05 01:58 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


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