Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 733
Default 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)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search, find or lookup defined text in text string zzxxcc Excel Worksheet Functions 9 September 6th 07 09:37 PM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM
Find text in string Mike D.[_3_] Excel Programming 5 November 24th 04 09:41 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM
How to Find text in String? Milind Excel Programming 0 September 2nd 03 10:26 PM


All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"