SUMPRODUCT + MID multiple sheets - not working?

Camel123

Board Regular
Joined
Jun 5, 2018
Messages
186
Hi,

Trying to sum multiple columns from another sheet based on one criteria, which is determined by the "MID" function. What is wrong with the formula?

1) B2 (formatted as text)=9132456, 6753456

2) 6753456 appears in D:D (formatted as text as well). It has 100$ in col. P and -10$ in Q. Should return 90$ then but I get #value !


{=SUMPRODUCT(--('export'!D:D=MID('upload'!B2;10;7)*('export'!P:Q)))}

Tried without {} and -- but makes no difference.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hey, try this formula:

=SUMPRODUCT((export!D:D=VALUE(MID(upload!B2,10,7)))*(export!P:Q))
 
Upvote 0
What error are you getting? I noticed you used semi colons instead of commas to separate parameters so perhaps try that?
 
Upvote 0
If you want to do an addition, eg:

=SUMPRODUCT(--(export!D1:D100=MID(upload!B2,10,7)),export!P1:P100+export!Q1:Q100)
 
Upvote 0
I know it has to do with the version that I am using is swedish and it seem to be different to others. ; is the same as your ,
 
Upvote 0
If you want to do an addition, eg:

=SUMPRODUCT(--(export!D1:D100=MID(upload!B2,10,7)),export!P1:P100+export!Q1:Q100)

Not working,

So, I replaced 9132456, 6753456 with letters "abcdefg, hijklmn" on all places and all of a sudden it worked, even though 9132456, 6753456 are formatted as text.
 
Upvote 0
What happens if you nest steves MID formula in a VALUE?

=SUMPRODUCT(--(export!D1:D100=VALUE(MID(upload!B2;10;7))),export!P1:P100+export!Q1:Q100)
 
Upvote 0
Odd... I've tried both of the formulas posted by myself and Steve and they both work for me...

Is cell B2 on the upload sheet definitely populated? I'm just scratching my head as to why you're getting a #value ! error
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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
Back
Top