Add-Ins for Ms-Excel

This article cointain two add-ins. One is for a case-sensitive search (named searchm), and the second is one for a non-case sensitive search (named searchnm).

As you read this article, one question raised in your mind might be that, in Excel, there already is a built-in function available, so what is the use of this module or in what way does it differ from built-in search functions that are available in Excel? Do I need one or more function to get the correct answer? That is easy for a programmer to answer, but creates a great headache for normal people.


In two string matches, the built-in search function is thin; it returns an index of matching strings, but what if it doesn't get a matching pattern? It genereates a #value! error to handle. You need one more function; this results in a complexity in use. The easy method is to use either of these two methods that directly result in either true or false, depending on the string follow pattern. With these add-ins, I provide a method of using it.

Add-Ins for MS Excel to Match Two Case-Sensitive Strings (searchm and searchnm)

In both searchm and searchnm, the functions are as follows:

  • # represents a single digit
  • ? represents a single digit or char
  • * represents a zero or many digits or chars

To perform a non-case sensitive, the add-in name is searchnm. Use Formula 1 to conduct a non-case sensitive search with searchnm.

Formula 1: Using searchnm

1)=searchnm("a*a","aBBBa")                 ' Returns True.
2)=searchnm("[A-Z]" ,"F")                  ' Returns True.
3)=searchnm ("[!A-Z]","F" )                ' Returns False.
4)=searchnm ("a#a","a2a")                  ' Returns True.
5)=searchnm ("a[L-P]#[!c-e]" ,b.aM5b" )    ' Returns True.
6)=searchnm ("B?T*" , BAT123khg" )         ' Returns True.
7)=searchnm ( "B?T*" ,"CAT123khg")         ' Returns False.

In the case above, you may use a cell address that contains a string.

For searchm, the case-sensitive search, use Forumula 2.

Formula 2: Using searchm

 1)=searchm("a*a","aBBBa")                 ' Returns True.
 2)=searchm("[A-Z]" ,"F")                  ' Returns True.
 3)=searchm ("[!A-Z]","F" )                ' Returns False.
 4)=searchm ("a#a","a2a")                  ' Returns True.
 5)=searchm ("a[L-P]#[!c-e]" ,b.aM5b" )    ' Returns True.
 6)=searchm ("B?T*" , BAT123khg" )         ' Returns True.
 7)=searchm ( "B?T*" ,"CAT123khg")         ' Returns False.
 8)=searchm("A*A","aBBBa")                 ' Returns False.
 9)=searchm("[A-Z]" ,"F")                  ' Returns False.
10)=searchm ("A#A","a2a")                  ' Returns False.

In the case above, you may use a cell address that contains a string.

About the Author

Nileema Sadar

Resume Miss. Nileema Bhaurao Sadar C/o B. N.Sadar Kirti Nagar , Behind Tammane Hospital. Akola Ph no :(0724)2459002, 9823853778 EDUCATIONAL QUALIFICATIONS: BE(computer) from Amravati University freshers2006 COMPUTING SKILLS: Languages : C, C++, Java , FoxPro Operating System : Windows 98/xp/2000 Front End : Visual Basic 6,VB.Net Database : Oracle 8i,SQL Server Markup Language : HTML,DTML, Animation : Flash 5 EXPERIENCE : Vidharabha Publication PVT. LTD M.S. 15 MAY 2006Project Trainee Platform: VB, VB .Net, ASP.Net, MS- Access, SQL Server, FoxPro PROJECT PROFILE: 1. Title: CSE-Bytes (An Departmental Portal) Environment : ASP, HTML, DHTML, FLASH, MS-Access 2. Title: On line Qualitative Aptitude test Environment : Visual Basic 6.0, Oracle8i PROJECT PRESENTED: QUEST Third position winner in National level software competition at Bharati Vidhyapeeth Deemed University Institute of management and Entrepreneurship development, pune. Environment : Visual Basic 6.0, MS-Access



  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds