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

I have the following formula on one of my worksheets but when cell B3 is
"All" I return the correct value but when it's not "All" I get an error
#VALUE!. What would cause this error in my formula? Everything looks correct
to me.

=IF($B$3="All",SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$J$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000<"All")),SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$I$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000=YTDSummary!$B$3)))
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Formula Problem

Maybe this s/b J2:J50000?
--(YEAR(Detail!$I$2:$J$50000)


"Secret Squirrel" wrote:

I have the following formula on one of my worksheets but when cell B3 is
"All" I return the correct value but when it's not "All" I get an error
#VALUE!. What would cause this error in my formula? Everything looks correct
to me.

=IF($B$3="All",SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$J$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000<"All")),SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$I$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000=YTDSummary!$B$3)))

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

Sometimes the obvious gets overlooked! Thank you for pointing that out. I
guess after staring at the screen for a while things look the way they should

Thanks!

"JMB" wrote:

Maybe this s/b J2:J50000?
--(YEAR(Detail!$I$2:$J$50000)


"Secret Squirrel" wrote:

I have the following formula on one of my worksheets but when cell B3 is
"All" I return the correct value but when it's not "All" I get an error
#VALUE!. What would cause this error in my formula? Everything looks correct
to me.

=IF($B$3="All",SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$J$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000<"All")),SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$I$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000=YTDSummary!$B$3)))

  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Formula Problem

Glad that was the only problem - thanks for posting back.

"Secret Squirrel" wrote:

Sometimes the obvious gets overlooked! Thank you for pointing that out. I
guess after staring at the screen for a while things look the way they should

Thanks!

"JMB" wrote:

Maybe this s/b J2:J50000?
--(YEAR(Detail!$I$2:$J$50000)


"Secret Squirrel" wrote:

I have the following formula on one of my worksheets but when cell B3 is
"All" I return the correct value but when it's not "All" I get an error
#VALUE!. What would cause this error in my formula? Everything looks correct
to me.

=IF($B$3="All",SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$J$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000<"All")),SUMPRODUCT(--(MONTH(Detail!$J$2:$J$50000)=MONTH($B15)),--(YEAR(Detail!$I$2:$J$50000)=YEAR($B15)),--(Detail!$K$2:$K$50000=1),--(Detail!$B$2:$B$50000=YTDSummary!$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 Rickhotblue Excel Discussion (Misc queries) 2 February 16th 07 01:53 AM
Now formula problem Lp12 Excel Worksheet Functions 4 May 31st 06 10:44 AM
IF THEN formula problem sharkfoot Excel Discussion (Misc queries) 2 March 23rd 06 01:39 PM
Formula Problem superkopite Excel Discussion (Misc queries) 5 February 21st 06 01:05 PM
Formula Problem J.C.De New Users to Excel 1 January 21st 05 04:22 PM


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