Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have created an IF statement which I use to search a string for the letter
"a", and "a" can appear multiple times in the string. A value of "1" is assinged each time "a" is found. I would like to know the SUM of values for "a". My IF statement is: IF(ISERR(IF(SEARCH("a",$B2)0,1,0)),0,IF(SEARCH("a ",B2)0,1,0)). I would like to include this condition in the above IF Statement. IF B20,SUM(B2),0) |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=len(b2)-len(substitute(b2,"a",""))
Accountant7 wrote: I have created an IF statement which I use to search a string for the letter "a", and "a" can appear multiple times in the string. A value of "1" is assinged each time "a" is found. I would like to know the SUM of values for "a". My IF statement is: IF(ISERR(IF(SEARCH("a",$B2)0,1,0)),0,IF(SEARCH("a ",B2)0,1,0)). I would like to include this condition in the above IF Statement. IF B20,SUM(B2),0) |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I just tested this formula on a string, aaa, and it returned a value of 1...
I'm not sure what your question is here? How to sum a series of values? How to count the total number of a's in a given string? Dave -- Brevity is the soul of wit. "Accountant7" wrote: I have created an IF statement which I use to search a string for the letter "a", and "a" can appear multiple times in the string. A value of "1" is assinged each time "a" is found. I would like to know the SUM of values for "a". My IF statement is: IF(ISERR(IF(SEARCH("a",$B2)0,1,0)),0,IF(SEARCH("a ",B2)0,1,0)). I would like to include this condition in the above IF Statement. IF B20,SUM(B2),0) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Returning text from nested IF and Vlookup statements | Excel Worksheet Functions | |||
Nested If Statements | Excel Worksheet Functions | |||
UDFunctions and nested If-the-else statements | Excel Worksheet Functions | |||
multiple nested IF statements | Excel Worksheet Functions | |||
Nested IF statements | Excel Worksheet Functions |