Find text within a string

  • Thread starter Thread starter azdps
  • Start date Start date
A

azdps

I can't seem to find a solution for my problem.

I need to search through cells A1:A5 to find specific text within
string and if found I need the total up the B cells next to where th
text was found. For example I need to find "*this*" inside cells A1-A
as shown below and then total the B cells next to where "*this*" wa
found.


A1: findhere B1: 2
A2: find*this*here B2: 2
A3: findhere B3: 4
A4: find*this*here B4: 4
A5: findhere*this* B5: 1

In the example above example cells A2, A4 and A5 had "*this*". So m
final total would be 2+4+1 = 7 from the B cells
 
azdps wrote...
....
. . . For example I need to find "*this*" inside cells A1-A5
as shown below and then total the B cells next to where "*this*" was
found.

A1: findhere B1: 2
A2: find*this*here B2: 2
A3: findhere B3: 4
A4: find*this*here B4: 4
A5: findhere*this* B5: 1

In the example above example cells A2, A4 and A5 had "*this*". So my
final total would be 2+4+1 = 7 from the B cells.

Taking your search string literally, you could use the worksheet
formula

=SUMIF(A1:A5,"~*this~*",B1:B5)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top