#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default nested if statements

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default nested if statements

=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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default nested if statements

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
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
Returning text from nested IF and Vlookup statements Patricia Excel Worksheet Functions 10 July 28th 06 04:22 PM
Nested If Statements Jasmine Excel Worksheet Functions 2 January 26th 06 03:47 PM
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
multiple nested IF statements jazzydwit Excel Worksheet Functions 4 December 29th 05 05:23 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM


All times are GMT +1. The time now is 08:18 PM.

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"