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 =SUMPRODUCT(--($D$5:$D$57=$D121),--(G$5:G$57))

I'm stuck using XL 2000 and so can't figure out why this formula is not
calculating. D5:D57 are expense codes, formatted as General. These expense
codes are 5 digits long, but are NOT formatted as numbers. D121 is an
expense code, formatted as General. G5:G57 are dollar values, formatted as
Accounting.

The value returned should be $1,203,201 but $0 is being returned.

Does XL 2000 have a SUMPRODUCT limitation that I'm unaware of?

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: 35,218
Default =SUMPRODUCT(--($D$5:$D$57=$D121),--(G$5:G$57))

First, changing the format of a cell won't change the value.

If the cell was formatted as text and you typed 12345, then changed the format
to General, the value will still be the text: 12345.

But if D5:D57 are really text values, then try formatting D121 as text and
reenter the value. Then check the formula.

Or...
=SUMPRODUCT(--($D$5:$D$57=$D121&""),--(G$5:G$57))
or maybe...
=SUMPRODUCT(--($D$5:$D$57=text($D121,"00000")),--(G$5:G$57))

$d121&"" will coerce the number to text
and
=text($d121,"00000") will return a string with (maybe) leading 0's.

Dave F wrote:

I'm stuck using XL 2000 and so can't figure out why this formula is not
calculating. D5:D57 are expense codes, formatted as General. These expense
codes are 5 digits long, but are NOT formatted as numbers. D121 is an
expense code, formatted as General. G5:G57 are dollar values, formatted as
Accounting.

The value returned should be $1,203,201 but $0 is being returned.

Does XL 2000 have a SUMPRODUCT limitation that I'm unaware of?

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


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default =SUMPRODUCT(--($D$5:$D$57=$D121),--(G$5:G$57))

Thanks for the suggestions but neither one works.

Oddly, if I copy a signle expense code from the range D5:D57 and paste it in
D121, the formula works correctly!

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


"Dave Peterson" wrote:

First, changing the format of a cell won't change the value.

If the cell was formatted as text and you typed 12345, then changed the format
to General, the value will still be the text: 12345.

But if D5:D57 are really text values, then try formatting D121 as text and
reenter the value. Then check the formula.

Or...
=SUMPRODUCT(--($D$5:$D$57=$D121&""),--(G$5:G$57))
or maybe...
=SUMPRODUCT(--($D$5:$D$57=text($D121,"00000")),--(G$5:G$57))

$d121&"" will coerce the number to text
and
=text($d121,"00000") will return a string with (maybe) leading 0's.

Dave F wrote:

I'm stuck using XL 2000 and so can't figure out why this formula is not
calculating. D5:D57 are expense codes, formatted as General. These expense
codes are 5 digits long, but are NOT formatted as numbers. D121 is an
expense code, formatted as General. G5:G57 are dollar values, formatted as
Accounting.

The value returned should be $1,203,201 but $0 is being returned.

Does XL 2000 have a SUMPRODUCT limitation that I'm unaware of?

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


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default =SUMPRODUCT(--($D$5:$D$57=$D121),--(G$5:G$57))

Find 4 empty cells:

=count(d5:d57)
=counta(d5:d57)

=count(d121)
=counta(d121)

If all your entries are numbers, then each pair should match.

You may even want to do:
=count(g5:g57)
and compare it to:
=counta(g5:g57)

if the values in G5:G57 are really numbers, you don't need the --() stuff.

Dave F wrote:

Thanks for the suggestions but neither one works.

Oddly, if I copy a signle expense code from the range D5:D57 and paste it in
D121, the formula works correctly!

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

"Dave Peterson" wrote:

First, changing the format of a cell won't change the value.

If the cell was formatted as text and you typed 12345, then changed the format
to General, the value will still be the text: 12345.

But if D5:D57 are really text values, then try formatting D121 as text and
reenter the value. Then check the formula.

Or...
=SUMPRODUCT(--($D$5:$D$57=$D121&""),--(G$5:G$57))
or maybe...
=SUMPRODUCT(--($D$5:$D$57=text($D121,"00000")),--(G$5:G$57))

$d121&"" will coerce the number to text
and
=text($d121,"00000") will return a string with (maybe) leading 0's.

Dave F wrote:

I'm stuck using XL 2000 and so can't figure out why this formula is not
calculating. D5:D57 are expense codes, formatted as General. These expense
codes are 5 digits long, but are NOT formatted as numbers. D121 is an
expense code, formatted as General. G5:G57 are dollar values, formatted as
Accounting.

The value returned should be $1,203,201 but $0 is being returned.

Does XL 2000 have a SUMPRODUCT limitation that I'm unaware of?

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


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =SUMPRODUCT(--($D$5:$D$57=$D121),--(G$5:G$57))

That leads me to believe that the formats are not the same. When you copy
from the range D5:D57 and paste into D121 you're also copying and pasting
the format of the source (unless you do a pastespecial and exclude the
format). And, as you say, when you do that the formula then works.

Dave P. explained that simply changing a format does not apply until the
target cell is edited.

Biff

"Dave F" wrote in message
...
Thanks for the suggestions but neither one works.

Oddly, if I copy a signle expense code from the range D5:D57 and paste it
in
D121, the formula works correctly!

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


"Dave Peterson" wrote:

First, changing the format of a cell won't change the value.

If the cell was formatted as text and you typed 12345, then changed the
format
to General, the value will still be the text: 12345.

But if D5:D57 are really text values, then try formatting D121 as text
and
reenter the value. Then check the formula.

Or...
=SUMPRODUCT(--($D$5:$D$57=$D121&""),--(G$5:G$57))
or maybe...
=SUMPRODUCT(--($D$5:$D$57=text($D121,"00000")),--(G$5:G$57))

$d121&"" will coerce the number to text
and
=text($d121,"00000") will return a string with (maybe) leading 0's.

Dave F wrote:

I'm stuck using XL 2000 and so can't figure out why this formula is not
calculating. D5:D57 are expense codes, formatted as General. These
expense
codes are 5 digits long, but are NOT formatted as numbers. D121 is an
expense code, formatted as General. G5:G57 are dollar values,
formatted as
Accounting.

The value returned should be $1,203,201 but $0 is being returned.

Does XL 2000 have a SUMPRODUCT limitation that I'm unaware of?

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


--

Dave Peterson





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 sumproduct nastech Excel Discussion (Misc queries) 4 June 24th 06 08:54 PM
Sumproduct Steved Excel Worksheet Functions 4 October 4th 05 06:19 AM
Sumproduct Esrei Excel Discussion (Misc queries) 2 August 12th 05 04:22 PM
Like Sumproduct, But Different ericsh Excel Worksheet Functions 6 August 11th 05 05:49 PM
Sumproduct Help Rob Excel Worksheet Functions 11 August 8th 05 10:00 PM


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