Index match with non unique values

juanitadeb

New Member
Joined
Oct 16, 2022
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
0000378GFCP1 or FCP4€ 39.44
0​
€ -
0​
€ -
0000447G
0​
€ -
0​
€ -
0​
€ -
0000450G
0​
€ -
0​
€ -
0​
€ -
0000458G2.01.03€ 70.472.01.07.01.02€ 375.752.01.07.01.02€ 228.13

So this is example of my data.

Now i want the addition of the amount for each value (2.01.07.01.02) for each ID.

I tried with IFNA(INDEX(TRANSPOSE(Sheet2!4:4),MATCH("2.04.02",TRANSPOSE(Sheet2!4:4),0)+1,1),0) but it was only finding the first one.

Is there a way to do this please?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Welcome to the MrExcel board!

Your requirement is not clear to me. Can you explain again more clearly?
Also ensure that you give the expected result for the sample data.

BTW, how would "2.04.02" match anything in that sample data? :confused:
 
Upvote 0
Welcome to the MrExcel board!

Your requirement is not clear to me. Can you explain again more clearly?
Also ensure that you give the expected result for the sample data.

BTW, how would "2.04.02" match anything in that sample data? :confused:
So basically I need to search for the number where 2.04.02 & 2.01.07.01.02 are just examples of the data of 30 columns and 10000 rows.
I want my output to be the price which is the next column, but for their respective ID, so by row.
Now since the number is not unique in a row i have a problem of outputting the addition of the prices in just one cell.
By the command i used it outputted only the first match it found.

Sorry if i am not explaining my self correctly.
 
Upvote 0
Sorry if i am not explaining my self correctly.
It isn't really clear to us (or at least me) who are not familiar with your data and requirements.

What about making up a small but representative set of sample dummy data and enter the expected results manually into the worksheet, post all of that with XL2BB and explain how you got the expected results in that mini sheet?
 
Upvote 0
Dear @Peter_SSs

I think what he needs is to match multiple criterias in horizontal like 2.01.03 and 2.01.07.01.02 together and sum adjacent matching values and write the sum at the end of that row. He has 30 columns of data like this in a single row and the formula will be at the 31st column for example.

I can only explain the scenario because the rest is way over for me :)

The result should return column numbers, offset one to left and sum them. Something like SUM(OFFSET(INDEX(4:4,1,MATCH(1,(4:4)=",2.01.03")*MATCH(1,(4:4)=",2.01.07.01.02")),0,1))
But somehow MATCH function should return an array of columns in a 30-column range. I can't do that part :)


Actually it looks more like a sumif function.
 
Last edited by a moderator:
Upvote 0
Dear @Peter_SSs

I think what he needs is to match multiple criterias in horizontal like 2.01.03 and 2.01.07.01.02 together and sum adjacent matching values and write the sum at the end of that row. He has 30 columns of data like this in a single row and the formula will be at the 31st column for example.

I can only explain the scenario because the rest is way over for me :)
Yes, exactly! Thank you.
 
Upvote 0
A more compact alternative:
Excel Formula:
=SUM(SUMIF(A4:AD4,{"2.01.03","2.01.07.01.02"},OFFSET(A4:AD4,0,1)))
 
Upvote 0
Then can you provide the sample data and expected results as requested? There should be no need for 30 columns to demonstrate the principle.
IDPRODUCTPRICEPRODUCTPRICEPRODUCTPRICEPRODUCTPRICETotal of 2.01.07.01.02
107321202.01.02€ 2,914.262.01.07.01.02€ 5,018.892.01.07.01.02€ 4,025.852.01.07.01.02€ 18,277.35€27322.09

My problem is with the last column.
Is this version ok or should I uploaded somewhere else? I am sorry but i do not know how to use the website.
Thank you so much.
 
Upvote 0

Forum statistics

Threads
1,215,651
Messages
6,126,029
Members
449,281
Latest member
redwine77

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