Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jay d
 
Posts: n/a
Default finding a name in a string


I have a function that looks for a particular name in a list of names,
although it does not quite work. it is the 2nd part of the function
that isnt working.


Code:
--------------------
=SUMIF('Display By Catagory'!$F$9:$F$108,$B5,'Display By Catagory'!AU$9:AU$108)+SUMIF('Other Activities'!$F$8:$F$17,$B5,'Other Activities'!AU$8:AU$17)*IF(LEN(TRIM('Other Activities'!$F$8:$f$17))=0,0,LEN(TRIM('Other Activities'!$F$8:$f$17))-LEN(SUBSTITUTE('Other Activities'!$F$8:$f$17,";",""))+1)
--------------------


the red bit is the problem.
other activities sheet-
f8:f17 is a list of names
b5 is a name to look for in the list of names
au8:au17 has numbers in it and these need to be added up and put in the
cell this code is in.

in the if bit, i want to check all rows to see if a name is in a cell
but it wont let me do this for multiple cells.

i want the code to look in a list of names, if the list contains a
specific name, add up the numbers and put them in a cell, if there are
multiple names to search through in a cell, eg if james is in the list
simon, marc, james still to know the name is there and do the sum.

can anyone see what im doing wrong?

thanks


--
jay d
------------------------------------------------------------------------
jay d's Profile: http://www.excelforum.com/member.php...o&userid=34487
View this thread: http://www.excelforum.com/showthread...hreadid=551185

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
 
Posts: n/a
Default finding a name in a string

IF?? I understand you modify this to suit. To sum g for names in f
=SUMPRODUCT(($F$1:$F$4={"a","b","c"})*$G$1:$G$4)
to just count the number of them in F
=SUMPRODUCT(($F$1:$F$4={"a","b","c"})*1)
--
Don Guillett
SalesAid Software

"jay d" wrote in
message ...

I have a function that looks for a particular name in a list of names,
although it does not quite work. it is the 2nd part of the function
that isnt working.


Code:
--------------------
=SUMIF('Display By Catagory'!$F$9:$F$108,$B5,'Display By
Catagory'!AU$9:AU$108)+SUMIF('Other Activities'!$F$8:$F$17,$B5,'Other
Activities'!AU$8:AU$17)*IF(LEN(TRIM('Other
Activities'!$F$8:$f$17))=0,0,LEN(TRIM('Other
Activities'!$F$8:$f$17))-LEN(SUBSTITUTE('Other
Activities'!$F$8:$f$17,";",""))+1)
--------------------


the red bit is the problem.
other activities sheet-
f8:f17 is a list of names
b5 is a name to look for in the list of names
au8:au17 has numbers in it and these need to be added up and put in the
cell this code is in.

in the if bit, i want to check all rows to see if a name is in a cell
but it wont let me do this for multiple cells.

i want the code to look in a list of names, if the list contains a
specific name, add up the numbers and put them in a cell, if there are
multiple names to search through in a cell, eg if james is in the list
simon, marc, james still to know the name is there and do the sum.

can anyone see what im doing wrong?

thanks


--
jay d
------------------------------------------------------------------------
jay d's Profile:
http://www.excelforum.com/member.php...o&userid=34487
View this thread: http://www.excelforum.com/showthread...hreadid=551185



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
Finding specific text in a string Hardip Excel Worksheet Functions 5 April 8th 06 01:16 PM
Finding a text string w/in a Cell ricxl Excel Discussion (Misc queries) 12 March 20th 06 03:47 AM
finding what numbers are in a string (Day 2) David Excel Worksheet Functions 0 May 26th 05 10:10 PM
Finding Specific Text in a Text String Peter Gundrum Excel Worksheet Functions 9 April 10th 05 07:21 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 09:28 AM.

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

About Us

"It's about Microsoft Excel"