banner_ad

Todays ms excel lesson 05-12-2011 (advance strings function)

Excel for Finance 1167 views 1 replies

 

Counting The Number Of Specific Characters Or Strings Of Characters In A Cell

The following formula will return the number of times that the text in B1 occurs in the text in A1. This is not case sensitive so, for example,  ‘A’ is treated the same as ‘a’.

=IF(LEN(B1)=0,0,(LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER(B1),”")))/LEN(B1))

If you want to use a case-sensitve match where for example ‘A’ is treated differently than ‘a’, use the following formula:

=IF(LEN(B1)=0,0,(LEN(A1)-LEN(SUBSTITUTE(A1,B1,”")))/LEN(B1)) 

Counting The Number Of Letters In A Cell

The following formula counts the number of letters (A to Z, in either upper or lower case) in cell A1.

=IF(LEN(A1)=0,0,SUM((CODE(UPPER(MID(A1,ROW(INDIRECT(“1:”&LEN(A1))),1)))>=CODE(“A”))*(CODE(UPPER(MID(A1,ROW(INDIRECT(“1:”&LEN(A1))),1)))<=CODE(“Z”))))

This formula is an array formulas so you must press CTRL SHIFT ENTER rather than just ENTERwhen you first enter the formula and whenever you edit it later. If you do this properly, Excel will display the formula in the formula bar enclosed in curly braces { }. 

 

Click here Continue Reading 

Replies (1)

Great Post Sir.. Keep Sharing

               

 

                           


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
ARTICLESHIP 27 May 2026
CA Article Trainee

Rahul Dang & Associates-Chartered Accountants

Pune

CA Inter

View Details
Company
22 May 2026
Audit assistant

Displayandbeyond

Mumbai

CA

View Details
Company
19 May 2026
Fundraising Expert

MentorsWorld Ventures Private Limited

Ahmedabad

Others

View Details
Company
ARTICLESHIP 28 May 2026
Accounts, Audit & Compliance Executive

Shyam Joshi & Associates

Pune

B.Com

View Details
Company
27 May 2026
Audit Assitant

Virender K Gupta and Co

New Delhi

B.Com

View Details
Company
ARTICLESHIP 31 May 2026
Article Assistant

KPRS And Associates

New Delhi

CA Inter

View Details
Company
Featured 26 May 2026
Account Executive

SMJ global advisors pvt ltd

New Delhi

B.Com

View Details
Company
18 May 2026
MIS Executive

Primarc Pecan Retail Limited

Mumbai

B.Com

View Details