#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Formula Problem

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Formula Problem

First, I make no pretence to be a worksheet function expert. However, this is
my read.

When B3 is blank the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998))

When B3 contains a vendor name the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3))

Note that for the second snippet (when B3 contains name), for each element
in both arrays, all three arguments will evaluate to either 1 or 0 and the
sum of the product of these numerics will also be a numeric (1 or 0).
Therefore no error.

For the first snippet (when B3 is blank), the third argument
(Detail!$B$2:$B$43998) is only a list of names as I understand you. What is
the product of 1 * 1 * "Bob Smith" ??? Result is an error.

My read is that you can simply omit the third argument (list of names) and
it will return the desired count. Hope that helps.

Regards,
Greg

"Secret Squirrel" wrote:

In cell B3 I have a name list that I'm using to validate my summary sheet.
When I select a vendor from my list it is matching the name with any rows on
my detail sheet. It looks for that vendor name in column B on my detail
sheet. Then it is summarizing the counts by month and year for that vendor.
What I'm trying to do is have it summarize all vendors when cell B3 is blank.
That way my users can get a total summary count and if they choose they can
select a vendor and just get that vendors monthly summary. Does that make
sense to you? It is working when I select a vendor in cell B3 but when I
clear that cell is when I get the error message. When it's false is when a
vendor is selected in cell B3 that's why I have the
(Detail!$B2:$B43998=Summary!$B$3) so it can match that vendor with my detail
sheet.

Any thoughts?

"JLatham" wrote:

What is it supposed to be doing?
I see in the True condition for $B$3="" that it gives you the sum of the
values in Detail sheet for B2:B43998. If I can presume you're looking for
same from Summary sheet when $B$3< "" then look at the comparison, I am
thinking that (Detail!$B$2:$B$43998=Summary!$B$3) is incorrect and should be
(Summary!$B2:$B43998)
instead. But this is all exactly reverse from what you say is and isn't
working: looks to me like true condition should work, false shouldn't.

In which case, perhaps the end of the first SUMPRODUCT() needs to look like
this:
(Detail!$B$2:$B$43998="")
If you're just trying to get counts, that would be my guess on it.

What's in Details!$B$3 and what's in Summary!$B$3?



"Secret Squirrel" wrote:

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Formula Problem

What is it supposed to be doing?
I see in the True condition for $B$3="" that it gives you the sum of the
values in Detail sheet for B2:B43998. If I can presume you're looking for
same from Summary sheet when $B$3< "" then look at the comparison, I am
thinking that (Detail!$B$2:$B$43998=Summary!$B$3) is incorrect and should be
(Summary!$B2:$B43998)
instead. But this is all exactly reverse from what you say is and isn't
working: looks to me like true condition should work, false shouldn't.

In which case, perhaps the end of the first SUMPRODUCT() needs to look like
this:
(Detail!$B$2:$B$43998="")
If you're just trying to get counts, that would be my guess on it.

What's in Details!$B$3 and what's in Summary!$B$3?



"Secret Squirrel" wrote:

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Formula Problem

Greg,
You've described it very well and come to the same conclusion that I did
earlier. And I believe that your offered solution is the way to fix it.

"Greg Wilson" wrote:

First, I make no pretence to be a worksheet function expert. However, this is
my read.

When B3 is blank the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998))

When B3 contains a vendor name the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3))

Note that for the second snippet (when B3 contains name), for each element
in both arrays, all three arguments will evaluate to either 1 or 0 and the
sum of the product of these numerics will also be a numeric (1 or 0).
Therefore no error.

For the first snippet (when B3 is blank), the third argument
(Detail!$B$2:$B$43998) is only a list of names as I understand you. What is
the product of 1 * 1 * "Bob Smith" ??? Result is an error.

My read is that you can simply omit the third argument (list of names) and
it will return the desired count. Hope that helps.

Regards,
Greg

"Secret Squirrel" wrote:

In cell B3 I have a name list that I'm using to validate my summary sheet.
When I select a vendor from my list it is matching the name with any rows on
my detail sheet. It looks for that vendor name in column B on my detail
sheet. Then it is summarizing the counts by month and year for that vendor.
What I'm trying to do is have it summarize all vendors when cell B3 is blank.
That way my users can get a total summary count and if they choose they can
select a vendor and just get that vendors monthly summary. Does that make
sense to you? It is working when I select a vendor in cell B3 but when I
clear that cell is when I get the error message. When it's false is when a
vendor is selected in cell B3 that's why I have the
(Detail!$B2:$B43998=Summary!$B$3) so it can match that vendor with my detail
sheet.

Any thoughts?

"JLatham" wrote:

What is it supposed to be doing?
I see in the True condition for $B$3="" that it gives you the sum of the
values in Detail sheet for B2:B43998. If I can presume you're looking for
same from Summary sheet when $B$3< "" then look at the comparison, I am
thinking that (Detail!$B$2:$B$43998=Summary!$B$3) is incorrect and should be
(Summary!$B2:$B43998)
instead. But this is all exactly reverse from what you say is and isn't
working: looks to me like true condition should work, false shouldn't.

In which case, perhaps the end of the first SUMPRODUCT() needs to look like
this:
(Detail!$B$2:$B$43998="")
If you're just trying to get counts, that would be my guess on it.

What's in Details!$B$3 and what's in Summary!$B$3?



"Secret Squirrel" wrote:

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Formula Problem

In cell B3 I have a name list that I'm using to validate my summary sheet.
When I select a vendor from my list it is matching the name with any rows on
my detail sheet. It looks for that vendor name in column B on my detail
sheet. Then it is summarizing the counts by month and year for that vendor.
What I'm trying to do is have it summarize all vendors when cell B3 is blank.
That way my users can get a total summary count and if they choose they can
select a vendor and just get that vendors monthly summary. Does that make
sense to you? It is working when I select a vendor in cell B3 but when I
clear that cell is when I get the error message. When it's false is when a
vendor is selected in cell B3 that's why I have the
(Detail!$B2:$B43998=Summary!$B$3) so it can match that vendor with my detail
sheet.

Any thoughts?

"JLatham" wrote:

What is it supposed to be doing?
I see in the True condition for $B$3="" that it gives you the sum of the
values in Detail sheet for B2:B43998. If I can presume you're looking for
same from Summary sheet when $B$3< "" then look at the comparison, I am
thinking that (Detail!$B$2:$B$43998=Summary!$B$3) is incorrect and should be
(Summary!$B2:$B43998)
instead. But this is all exactly reverse from what you say is and isn't
working: looks to me like true condition should work, false shouldn't.

In which case, perhaps the end of the first SUMPRODUCT() needs to look like
this:
(Detail!$B$2:$B$43998="")
If you're just trying to get counts, that would be my guess on it.

What's in Details!$B$3 and what's in Summary!$B$3?



"Secret Squirrel" wrote:

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Formula Problem

Thanks Greg! That worked perfectly!

"Greg Wilson" wrote:

First, I make no pretence to be a worksheet function expert. However, this is
my read.

When B3 is blank the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998))

When B3 contains a vendor name the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3))

Note that for the second snippet (when B3 contains name), for each element
in both arrays, all three arguments will evaluate to either 1 or 0 and the
sum of the product of these numerics will also be a numeric (1 or 0).
Therefore no error.

For the first snippet (when B3 is blank), the third argument
(Detail!$B$2:$B$43998) is only a list of names as I understand you. What is
the product of 1 * 1 * "Bob Smith" ??? Result is an error.

My read is that you can simply omit the third argument (list of names) and
it will return the desired count. Hope that helps.

Regards,
Greg

"Secret Squirrel" wrote:

In cell B3 I have a name list that I'm using to validate my summary sheet.
When I select a vendor from my list it is matching the name with any rows on
my detail sheet. It looks for that vendor name in column B on my detail
sheet. Then it is summarizing the counts by month and year for that vendor.
What I'm trying to do is have it summarize all vendors when cell B3 is blank.
That way my users can get a total summary count and if they choose they can
select a vendor and just get that vendors monthly summary. Does that make
sense to you? It is working when I select a vendor in cell B3 but when I
clear that cell is when I get the error message. When it's false is when a
vendor is selected in cell B3 that's why I have the
(Detail!$B2:$B43998=Summary!$B$3) so it can match that vendor with my detail
sheet.

Any thoughts?

"JLatham" wrote:

What is it supposed to be doing?
I see in the True condition for $B$3="" that it gives you the sum of the
values in Detail sheet for B2:B43998. If I can presume you're looking for
same from Summary sheet when $B$3< "" then look at the comparison, I am
thinking that (Detail!$B$2:$B$43998=Summary!$B$3) is incorrect and should be
(Summary!$B2:$B43998)
instead. But this is all exactly reverse from what you say is and isn't
working: looks to me like true condition should work, false shouldn't.

In which case, perhaps the end of the first SUMPRODUCT() needs to look like
this:
(Detail!$B$2:$B$43998="")
If you're just trying to get counts, that would be my guess on it.

What's in Details!$B$3 and what's in Summary!$B$3?



"Secret Squirrel" wrote:

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Formula Problem

Thanks for the feedback. The OP's response to your post gave it away:
It looks for that vendor name in column B on my detail sheet.


Greg

"JLatham" wrote:

Greg,
You've described it very well and come to the same conclusion that I did
earlier. And I believe that your offered solution is the way to fix it.

"Greg Wilson" wrote:

First, I make no pretence to be a worksheet function expert. However, this is
my read.

When B3 is blank the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998))

When B3 contains a vendor name the following is evaluated:
SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3))

Note that for the second snippet (when B3 contains name), for each element
in both arrays, all three arguments will evaluate to either 1 or 0 and the
sum of the product of these numerics will also be a numeric (1 or 0).
Therefore no error.

For the first snippet (when B3 is blank), the third argument
(Detail!$B$2:$B$43998) is only a list of names as I understand you. What is
the product of 1 * 1 * "Bob Smith" ??? Result is an error.

My read is that you can simply omit the third argument (list of names) and
it will return the desired count. Hope that helps.

Regards,
Greg

"Secret Squirrel" wrote:

In cell B3 I have a name list that I'm using to validate my summary sheet.
When I select a vendor from my list it is matching the name with any rows on
my detail sheet. It looks for that vendor name in column B on my detail
sheet. Then it is summarizing the counts by month and year for that vendor.
What I'm trying to do is have it summarize all vendors when cell B3 is blank.
That way my users can get a total summary count and if they choose they can
select a vendor and just get that vendors monthly summary. Does that make
sense to you? It is working when I select a vendor in cell B3 but when I
clear that cell is when I get the error message. When it's false is when a
vendor is selected in cell B3 that's why I have the
(Detail!$B2:$B43998=Summary!$B$3) so it can match that vendor with my detail
sheet.

Any thoughts?

"JLatham" wrote:

What is it supposed to be doing?
I see in the True condition for $B$3="" that it gives you the sum of the
values in Detail sheet for B2:B43998. If I can presume you're looking for
same from Summary sheet when $B$3< "" then look at the comparison, I am
thinking that (Detail!$B$2:$B$43998=Summary!$B$3) is incorrect and should be
(Summary!$B2:$B43998)
instead. But this is all exactly reverse from what you say is and isn't
working: looks to me like true condition should work, false shouldn't.

In which case, perhaps the end of the first SUMPRODUCT() needs to look like
this:
(Detail!$B$2:$B$43998="")
If you're just trying to get counts, that would be my guess on it.

What's in Details!$B$3 and what's in Summary!$B$3?



"Secret Squirrel" wrote:

I have the following formula in my worksheet but I'm getting a "#Value!"
error. Can anyone shed some light if there is a problem with my formula? When
my value in B3 is false it works fine but when it's true I get the error
message above.

=IF($B$3="",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A7)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A7)),--(Detail!$B$2:$B$43998=Summary!$B$3)))

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 John48 Excel Worksheet Functions 8 August 7th 06 06:17 PM
Now formula problem Lp12 Excel Worksheet Functions 4 May 31st 06 11:44 AM
Problem with formula =MAX(A1-40,0) Lee Excel Discussion (Misc queries) 2 May 1st 06 05:18 AM
IF formula problem Joe Gieder Excel Worksheet Functions 3 October 13th 05 08:37 PM
Formula problem Steved Excel Worksheet Functions 2 July 5th 05 11:53 PM


All times are GMT +1. The time now is 05:38 AM.

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"