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?
 
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.
Have you tried my solution at post#9?
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I got a reference error
Try to start from the column referance where you begin to search for your condition.
Excel Formula:
=SUM(SUMIF(B4:AD4,{"2.01.03","2.01.07.01.02"},OFFSET(B4:AD4,0,1)))
What are the address of ID column and address of Total column?
 
Last edited by a moderator:
Upvote 0
Solution
Is this version ok or should I uploaded somewhere else? I am sorry but i do not know how to use the website.
That version is better than nothing but the best way is to use XL2BB, as I have done below. I provided a link for XL2BB in post #4 and there are instructions if you follow that link.

Based on your sample in post #10, see if this is what you want.
You may have to adjust the ranges in the formula to suit your data but note that the two ranges are offset by one column.

22 10 17.xlsm
ABCDEFGHIJ
1IDPRODUCTPRICEPRODUCTPRICEPRODUCTPRICEPRODUCTPRICETotal of 2.01.07.01.02
2107321202.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.3527,322.09
Product Sum
Cell Formulas
RangeFormula
J2J2=SUMIF(B2:H2,"2.01.07.01.02",C2:I2)
 
Upvote 0
Try to start from the column referance where you begin to search for your condition.
Excel Formula:
=SUM(SUMIF(B4:AD4,{"2.01.03","2.01.07.01.02"},OFFSET(B4:AD4,0,1)))
What are the address of ID column and address of Total column?
ID is in column A and Total column CR
 
Upvote 0
That version is better than nothing but the best way is to use XL2BB, as I have done below. I provided a link for XL2BB in post #4 and there are instructions if you follow that link.

Based on your sample in post #10, see if this is what you want.
You may have to adjust the ranges in the formula to suit your data but note that the two ranges are offset by one column.

22 10 17.xlsm
ABCDEFGHIJ
1IDPRODUCTPRICEPRODUCTPRICEPRODUCTPRICEPRODUCTPRICETotal of 2.01.07.01.02
2107321202.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.3527,322.09
Product Sum
Cell Formulas
RangeFormula
J2J2=SUMIF(B2:H2,"2.01.07.01.02",C2:I2)
Thank you very much for your help! Yours worked as well.
 
Upvote 0
Try to start from the column referance where you begin to search for your condition.
Excel Formula:
=SUM(SUMIF(B4:AD4,{"2.01.03","2.01.07.01.02"},OFFSET(B4:AD4,0,1)))
What are the address of ID column and address of Total column?
It worked sorry I was taking the column of id within the array aswell. Thank you for your help!
 
Upvote 0
I notice that you have marked post #13 as the solution. Be aware that OFFSET is a volatile function so I would recommend avoiding such formulas where possible. If looking up multiple values in the same row then the same result can be achieved with this non-volatile (& simpler) alternative

Excel Formula:
=SUM(SUMIF(B4:AD4,{"2.01.03","2.01.07.01.02"},C4:AE4))
 
Upvote 0

Forum statistics

Threads
1,216,126
Messages
6,129,021
Members
449,480
Latest member
yesitisasport

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