sumif exact match string text

coralie

New Member
Joined
Jan 21, 2016
Messages
5
Hello,
I am bit stuck with my formula and hoping you guys can help me find a solution

I have 2 columns containing strings of text - for example:

CD
CodeRegion
Abcd15/22 | Bcd2/16 | Bcd21/04 | Bcd22/04 | def6H/04 | Bcd/04 |H01q1/00 | Gos1/44JP4685349B2 | CN1316677C | DE60222772D1 | EP1407511A1 | CN1524318A

<tbody>
</tbody>

Please note that cell c should be linked to each region in cell D: Abcd15/22 is linked to Jpxxx, CNxxx, DExxx, EPxx, CNxxx etc...


I have a vba code to clean and split both columns as per below:

Sheet1
cdefghij
code 1code 2code 3code 4code 5code 6code 7code 8
Abcd15Bcd2Bcd21Bcd22def6HBcdH01q1Gos1

<tbody>
</tbody>

Sheet2
cdefg
region1region2region3region4region5
JPCNDEEPCN

<tbody>
</tbody>


I have a sheet counting the occurence of each region using =(LEN(C4)-LEN(SUBSTITUTE(C4; $D$2; "")))/LEN($D$2)

Now, I am trying to sum the region occurence for each code and I am using: SUMIF('Region count'!$C:$C;"*"&A3&"*";'Region count'!$D:$D) -> Array formula (where col C is the "unclean" string of text, Col A is the list of all codes cleaned and col D the count of occurence for region JP)

<tbody>
</tbody>
I had to do a few "arrangements" already... counting the number of charcters to add a space as some of the codes are too similar (ex: G01S), now i have an issue with codes like G01S1 suming up number of occurence from G01S13, G01S17, etc...

Is there a way to use sumif for exact match? If any other suggestion please let me know.

Also, as I am trying to create a template report hence I need everything to be linked and reference.

Last thing, my file is already running slow but i only have 7 sheets, formulas & array and 2 short vba code. Is there anything I can do to make if run better?

Hope my explanations are clear, if not please let me.

Thanks a lot for your help,

CORALIE


<tbody>
</tbody>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,215,339
Messages
6,124,373
Members
449,155
Latest member
ravioli44

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