MID Function

pells

Active Member
Joined
Dec 5, 2008
Messages
361
Is it possible to use the MID function within SUMPRODUCT, SUMIF or SUM?

I am trying to obtain the 4th character for the next 3 characters within a cell and to sum against them.

At the moment I have:

SUMPRODUCT(MID('Week 29'!B11:B54,4,3)*'Week 29'!F11:F54)

But keep getting a #VALUE! error.

Any help would be greatly received.

Many thanks.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hello

You are trying to multiply text.

Try this:

Code:
SUMPRODUCT((MID('Week 29'!B11:B54,4,3)*1)*('Week 29'!F11:F54))
 
Upvote 0
Thanks for this.

I forgot to mention that the MID('Week 29'!B11:B54,4,3) needs to equal "999".

Do you know how to put this into the code?

Many thanks.
 
Upvote 0
Try this if column B is alphanumeric

=SUMIF('Week 29'!B11:B54,"???999*",'Week 29'!F11:F54)

...if it's numeric then

=SUMPRODUCT((MID('Week 29'!B11:B54,4,3)="999")+0,'Week 29'!F11:F54)
 
Upvote 0
Code:
SUMPRODUCT((MID('Week 29'!B11:B54,4,3)="999")*'Week 29'!F11:F54)
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,476
Members
448,967
Latest member
visheshkotha

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