How to Combine Sumproduct with Index Match

andyka

Board Regular
Joined
Sep 20, 2021
Messages
52
Office Version
  1. 2019
Platform
  1. Windows
Hi
I have following Table:

A B C D E F
Yr21 Yr22 Yr23 Yr24
yr21 £10,000
yr22 £8,000
yr23 £12,000

I am looking for following:
A B C D E F
Yr21 Yr22 Yr23 Yr24
yr21 £10,000 21 - £10,000
yr22 £8,000 22-£8,000
yr23 £12,000 23-£12,000

Currently I have two separate formulas but need help to combine both.

Formula to extract 21 from text string: =SUMPRODUCT(MID(0&G5, LARGE(INDEX(ISNUMBER(--MID(G5, ROW(INDIRECT("1:"&LEN(G5))), 1)) * ROW(INDIRECT("1:"&LEN(G5))), 0), ROW(INDIRECT("1:"&LEN(G5))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(G5)))/10)

Formula to Index Match: =IFNA(INDEX($L$5:$L$10,MATCH(M$4,$K$5:$K$10,0),MATCH($K5,M$4,0)),"")

Please help

Thank you
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Those two formula make no sense with the data you have shown, can you post some sample data including the correct formulae.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hi Fluff
Thank you ever so much for considering my Thread
1665665866515.png
 
Upvote 0
That does help either as I cannot see what rows/columns everything is in & it also means I have to type it all out. Please see post#2 about how to post data (not an image)
 
Upvote 0
My Apologies Fluff. Its my first time. I am new to MrExcel site.

Extract number from text string.xlsx
DEFGHIJKLMNOPQRSTUVWXYZAAAB
2
3=SUMPRODUCT(MID(0&G5, LARGE(INDEX(ISNUMBER(--MID(G5, ROW(INDIRECT("1:"&LEN(G5))), 1)) * ROW(INDIRECT("1:"&LEN(G5))), 0), ROW(INDIRECT("1:"&LEN(G5))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(G5)))/10)
4yr21
5yr2121
6yr21yr22yr23yr24yr25yr26
7yr21£10,00010000     =IFNA(INDEX($L$7:$L$12,MATCH(M$6,$K$7:$K$12,0),MATCH($K7,M$6,0)),"")
8yr22£8,000 8000    
9yr23£12,000  12000   
10yr24£6,000   6000  
11yr25£15,000    15000 
12yr26£22,000     22000
13
14
15I am Looking for the following: Combine both above formula to achieve values below
16yr21yr22yr23yr24yr25yr26
17yr21£10,00021-£10,000
18yr22£8,00022-£8,000
19yr23£12,00023-£12,000
20yr24£6,00024-£6,000
21yr25£15,00025-£15,000
22yr26£22,00026-£22,000
23
24
25
26
27
28
Sheet1
Cell Formulas
RangeFormula
H5H5=SUMPRODUCT(MID(0&G5, LARGE(INDEX(ISNUMBER(--MID(G5, ROW(INDIRECT("1:"&LEN(G5))), 1)) * ROW(INDIRECT("1:"&LEN(G5))), 0), ROW(INDIRECT("1:"&LEN(G5))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(G5)))/10)
M7:R12M7=IFNA(INDEX($L$7:$L$12,MATCH(M$6,$K$7:$K$12,0),MATCH($K7,M$6,0)),"")
 
Upvote 0
Upvote 0
Solution
OMG! Fluff.
You're a Star, You're a Champion. Thank you! Thank you!...... So much. Problem Solved.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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