Index match to replace dynamic named range

jcooooper

Board Regular
Joined
Mar 24, 2018
Messages
74
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm trying to replace a named range in my SUMPRODUCT calculation, in order to speed up my sheet.

I'm thinking it's some sort of combination of INDEX, MATCH and COUNTIF, but can't crack the code

If the below range is located in A1:B7, and I'm trying to return the in range in column A, if the text in column B is Equities, i.e A3:A6, what's the best way?


GB9217Alternatives
LP8811Alternatives
FT_U0PXEquities
6005Equities
GB926Equities
36009Equities
134315Bonds

<colgroup><col><col></colgroup><tbody>
</tbody>

Many thanks!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Not sure if this has potential to speed things up for you or not....

If confirmed Ctrl + Shift + Enter then E1 will return the range values.
Otherwise, G1 will return the range address for use with INDIRECT function


Excel 2010
ABCDEFG
1GB9217AlternativesFT_U0PXA3:A7
2LP8811Alternatives
3FT_U0PXEquities
46005Equities
5GB926Equities
636009Equities
7134315Bonds
INFO
Cell Formulas
RangeFormula
G1="A" & MATCH("Equities",B1:B7,0) & ":A" & MATCH("Equities",B1:B7,0) + COUNTIF(B1:B7,"Equities")
E1{=INDEX(A1:A7,MATCH("Equities",B1:B7,0)):INDEX(A1:A7,MATCH("Equities",B1:B7,0)+COUNTIF(B1:B7,"Equities"))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
The sumproduct formula uses arrays as the array formulas. That makes the sheets slow.
If you are already having speed problems on your sheet, it may be best to change the formulas to macros.
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,986
Members
448,538
Latest member
alex78

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