#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default SUMPRODUCT

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default SUMPRODUCT

What are the values of A3 and A19? Are they both numeric?

"Mark Allen" wrote:

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default SUMPRODUCT

A3 is text and A19 is text, text and number or just number

"Barb Reinhardt" wrote:

What are the values of A3 and A19? Are they both numeric?

"Mark Allen" wrote:

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default SUMPRODUCT

Try something like this then

=SUMPRODUCT(--(A1:A10=B1),--(S2:S10 = T1))

HTH,

Barb Reinhardt

(Many of us review several Excel newsgroups. Multiposting is not necessary)

"Mark Allen" wrote:

A3 is text and A19 is text, text and number or just number

"Barb Reinhardt" wrote:

What are the values of A3 and A19? Are they both numeric?

"Mark Allen" wrote:

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default SUMPRODUCT

No, still the same.

What I don't get is why when I double click on the cell in the DATA sheet I
then press the enter key the contents of the cell move to the right (if a
number) and then the formula works.

However if it has got TEXT in the Cell it works fine...

Mark

"Barb Reinhardt" wrote:

Try something like this then

=SUMPRODUCT(--(A1:A10=B1),--(S2:S10 = T1))

HTH,

Barb Reinhardt

(Many of us review several Excel newsgroups. Multiposting is not necessary)

"Mark Allen" wrote:

A3 is text and A19 is text, text and number or just number

"Barb Reinhardt" wrote:

What are the values of A3 and A19? Are they both numeric?

"Mark Allen" wrote:

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark




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

The numbers in your data are text. A text "1" is not equal to a 1 formatted
as a number. Maybe format A19 as text so that everything is a text
comparison.

Also see your other post for a means to coerce the numbers in your data to
actual numeric values.





"Mark Allen" wrote:

No, still the same.

What I don't get is why when I double click on the cell in the DATA sheet I
then press the enter key the contents of the cell move to the right (if a
number) and then the formula works.

However if it has got TEXT in the Cell it works fine...

Mark

"Barb Reinhardt" wrote:

Try something like this then

=SUMPRODUCT(--(A1:A10=B1),--(S2:S10 = T1))

HTH,

Barb Reinhardt

(Many of us review several Excel newsgroups. Multiposting is not necessary)

"Mark Allen" wrote:

A3 is text and A19 is text, text and number or just number

"Barb Reinhardt" wrote:

What are the values of A3 and A19? Are they both numeric?

"Mark Allen" wrote:

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark


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

The numbers in your data are most likely text. A text "1" is not equal to a
1 formatted as a number. Maybe format A19 as text so that everything is a
text comparison?

Also see your other post for a means to coerce the numbers in your data to
actual numeric values.




"Mark Allen" wrote:

No, still the same.

What I don't get is why when I double click on the cell in the DATA sheet I
then press the enter key the contents of the cell move to the right (if a
number) and then the formula works.

However if it has got TEXT in the Cell it works fine...

Mark

"Barb Reinhardt" wrote:

Try something like this then

=SUMPRODUCT(--(A1:A10=B1),--(S2:S10 = T1))

HTH,

Barb Reinhardt

(Many of us review several Excel newsgroups. Multiposting is not necessary)

"Mark Allen" wrote:

A3 is text and A19 is text, text and number or just number

"Barb Reinhardt" wrote:

What are the values of A3 and A19? Are they both numeric?

"Mark Allen" wrote:

I am trying to re-create a spreadsheet into a single file where previously I
was linking to another but I am now having problems.

Original code:
=SUMPRODUCT(('No Prospects.xls'!$D$1:$D$10000=$A$3)*('No
Prospects.xls'!$G$1:$G$10000=A19))

Returns a value of 2

New code:
=SUMPRODUCT((Data!$C$1:$C$10000=$A$3)*(Data!$L$1:$ L$10000=A19))

Returns a value of 0 !!!!! should be 2

I know the cell range has changed i.e. D to C and G to L but this
should not matter.

The data in "Data" sheet comes direct from a SQL database where previously
it came from a CSV file.

It has something to do with the format coming in from the database. If I go
to the data in column L double click on one item and then press enter the
data now moves to the left !

I don't understand ?

Please help as this is really frustrating !!!!

Mark


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 scire Excel Worksheet Functions 3 August 11th 06 08:04 PM
Sumproduct sanders Excel Discussion (Misc queries) 2 August 9th 06 11:05 AM
sumproduct rhouchins Excel Worksheet Functions 1 November 1st 05 03:11 PM
Sumproduct ?? PhilGTI Excel Worksheet Functions 3 September 22nd 05 05:41 PM
sumproduct FLKULCHAR Excel Worksheet Functions 1 September 18th 05 03:36 PM


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