Sumif: Larger string not found in smaller string

a5ad

New Member
Joined
Sep 11, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have 2 sets of data that I need to reconcile against each other. The sumif works on the smaller text looking into the larger text but I cant make this work the other way round.

The Data sets are as follows:

Firstly Card, this is the reference number the bank gives me every time we have a card transaction. A single card transaction can be used to account for many purchases.

Secondly the Sales transactions, all sales are recorded with additional information to that of the Card transactions.

ColumnBCDEFGHIJ
Row 2Card£Sales Info£Card to SalesSales to Card
3
100000​
10​
Monday111111March
1000​
0​
0​
4
222222​
2000​
Tuesday222222April
2000​
2000​
0​
5
300000​
10​
Wednesday333333May
3000​
0​
0​
6
400000​
10​
Thursday444444June
4000​
0​
0​
7
500000​
10​
Friday555555July
5000​
0​
0​
8
333333​
3000​
Saturday666666August
6000​
3000​
0​
9
600000​
10​
Sunday777777September
7000​
0​
0​
10
700000​
10​
Monday888888October
8000​
0​
0​
11
800000​
10​
Tuesday999999November
9000​
0​
0​
12
444444​
4000​
Wednesday101010December
10000​
15000​
0​
13
900000​
10​
Thursday444444June
11000​
0​
0​
14
110000​
10​
Friday303030February
12000​
0​
0​
15
120000​
10​
Saturday404040March
13000​
0​
0​
16
130000​
10​
Sunday505050April
14000​
0​
0​
Formula's=SUMIF(E:E,"*"&B2&"*",F:F)=SUMIF(B:B,"*"&E2&"*",C:C)

I can get a result when I search for the Card reference (column B) in Sales Info (column E) using =SUMIF(E:E,"*"&B2&"*",F:F) to get the result as shown in Card to Sales (column H), but I can't seam to get a result when doing the reversal by checking column E to B.

Any help would be greatly appreciated.

Regards

Asad

PS apologies if this question has been answered before, I couldn't find anything on this particular topic.
 

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.
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFGHIJ
1Row 2Card£Sales Info£Card to SalesSales to Card
2310000010Monday111111March100000
342222222000Tuesday222222April200020002000
4530000010Wednesday333333May300006000
5640000010Thursday444444June4000010000
6750000010Friday555555July500000
783333333000Saturday666666August600030000
8960000010Sunday777777September700000
91070000010Monday888888October800000
101180000010Tuesday999999November900000
11124444444000Wednesday101010December10000150000
121390000010Thursday444444June11000010000
131411000010Friday303030February1200000
141512000010Saturday404040March1300000
151613000010Sunday505050April1400000
Master
Cell Formulas
RangeFormula
H2:H15H2=SUMIF(E:E,"*"&B2&"*",F:F)
J2:J15J2=SUM(FILTER($F$2:$F$15,ISNUMBER(SEARCH($B$2:$B$15,E2)),0))
 
Upvote 0
Hi Fluff,
Thank-you for the warm welcome.

I can see what you have done but unfortunately it does not resolve my issue. The card numbers in column B need to be an exact match (or thereabouts) as there are over daily 500 transactions to match off. Its generally 6 digits but can also be 4/5 digits if the numbers at the start are a zero they can often be omitted from the report.
 
Upvote 0
Is the Sales info just one string, or do the card nos have a space either side?
 
Upvote 0
Is the Sales info just one string, or do the card nos have a space either side?
The sales info is like the above but the information can be anywhere in the string, unfortunately no fixed format.

The card information generally has some other text infront of it but is not as long as the Sales info.
 
Upvote 0
In that case both formulae will fail & I'm not sure there is anything you can do about it.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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