Using SUMPRODUCT and wildcard ?

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
Morning all, I am using this formula below which works perfectly...however

$G7:G1000 contains time ranges, for example it could say 0900-1000 or 1000-1100 and so on

In reference T11, T12, T13 and so on, I have a list of all those time ranges, so the below code works without an issue

Code:
SUMPRODUCT((Schedule!G$7:G$1000=$T11)*SUBTOTAL(103,OFFSET(Schedule!G$7,ROW(Schedule!G$7:G$1000)-MIN(ROW(Schedule!G$7:G$1000))

The problem I have is that some of the text in G7:G1000 says, for example

0900-1000 H
1000-1100
0800-0900
1700-1800 H

So as you can see some of the times, are suffixed with a space and letter H

What I had hope to do was simply change the code to this

Code:
SUMPRODUCT((Schedule!G$7:G$1000=$T11*)*SUBTOTAL(103,OFFSET(Schedule!G$7,ROW(Schedule!G$7:G$1000)-MIN(ROW(Schedule!G$7:G$1000))

Simply adding in a wildcard asterix to the T11 but as you cleverer people will have realised I can't use a wildcard within SUMPRODUCT

Can anyone think of an alternative way of achieving this please ?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,389
Messages
6,119,232
Members
448,879
Latest member
VanGirl

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