![]() |
Find text within a string
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 -- azdp ----------------------------------------------------------------------- azdps's Profile: http://www.excelforum.com/member.php...fo&userid=3719 View this thread: http://www.excelforum.com/showthread.php?threadid=56929 |
Find text within a string
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) |
Find text within a string
thank you Harlan Grove. works as intended -- azdp ----------------------------------------------------------------------- azdps's Profile: http://www.excelforum.com/member.php...fo&userid=3719 View this thread: http://www.excelforum.com/showthread.php?threadid=56929 |
All times are GMT +1. The time now is 06:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com