SUMPRODUCT & LEFT functions causing unexpected result

kos666

New Member
Joined
Aug 10, 2010
Messages
6
Hello,

I am using the following in a sheet:-

=SUMPRODUCT((LEFT(Sheet1!$A$2:$A$9963,2)="50")*(Sheet1!$Q$2:$Q$9963>=$A30)*(Sheet1!$N$2:$N$9963=$C4))

Which returns the value of 5, which is what I want it to do. To help it be more dynamic I want to change the first sumproduct condition ="50" to point to a cell location, so I can change this at leisure without having to recode.

I changed it show =$A31, however the returned the value is now 0

So obviously something is wrong, but I can't figure out what.

I have also tried:-

=A31
=$A$31
=VALUE($A31)
=VALUE($A$31)
=VALUE(A31)

There's obviously some lack of knowledge on my part. So cap in hand... Any ideas please?

Kind Regards,
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=SUMPRODUCT((LEFT(Sheet1!$A$2:$A$9963,2)=$A31&"")*(Sheet1!$Q$2:$Q$9963>=$A30)*(Sheet1!$N$2:$N$9963=$C4))
 

kos666

New Member
Joined
Aug 10, 2010
Messages
6
They both worked as I needed.

Thank you for your prompt assistance.

Kind Regards,
 

Forum statistics

Threads
1,141,730
Messages
5,708,143
Members
421,549
Latest member
Dtcfire

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top