?
Solved

If search finds a certain word in range then add specific comment to different cell

Posted on 2016-08-31
11
Medium Priority
?
68 Views
Last Modified: 2016-09-01
How do I modify this so that it searches a range not single cells? So for example instead of AV2, I would like the range of AV:AZ to be searched for the word "A9270". Same for Fluoride.  Is it also possible to use Floride, Oral, Dental, Tooth. Any one of these could appear in a range. Then what would happen is the comments in the "" if match word is found will be added in a different column.

=IF(ISNUMBER(SEARCH("A9270",$AV2)),"A9270 By definition this is a HCPCS for non-covered services. Need instruction on benefit response.  Authorization has this code.", IF(ISNUMBER(SEARCH("Fluoride",$AV2))," Analysis required. Claims with Dental codes.","Analysis Required"))
0
Comment
Question by:Culwatrnca11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 26

Expert Comment

by:ProfessorJimJam
ID: 41778666
try this formula. it must be entered with control shift enter. becuase it is an array formula

but i suggest you use excel tables instead of whole column reference in AVto AZ

here is the formula

=IF(ISNUMBER(SEARCH(AV:AZ,{"A9270","Floride","Oral","Dental","Tooth"})),"Analysis Required","not required")

if any of those texts found in that AV:AZ then it will return analysis required and if not found then it will return not required.
0
 
LVL 32

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41778669
You may try something like this......

=IF(COUNTIF($AV:$AZ,"*A9270*"),"A9270 By definition this is a HCPCS for non-covered services. Need instruction on benefit response.  Authorization has this code.", IF(COUNTIF($AV:$AZ,"*Fluoride*")," Analysis required. Claims with Dental codes.","Analysis Required"))

Open in new window

0
 

Author Comment

by:Culwatrnca11
ID: 41778754
Neeraj,

Your version is working for my situation, how would you modify it to include multiple criteria? Fluoride, Dental, Oral, Teeth. Any one of these could appear in the range.

=IF(COUNTIF($AV:$AZ,"*A9270*"),"A9270 By definition this is a HCPCS for non-covered services. Need instruction on benefit response.  Authorization has this code.", IF(COUNTIF($AV:$AZ,"*Fluoride*")," Analysis required. Claims with Dental codes.","Analysis Required"))
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 32

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 2000 total points
ID: 41779245
Do you want to return the same statement if any cell in the range AV:AZ contains a string with either Fluoride or Dental or Oral or Teeth?
If so, you may try this.....

=IF(COUNTIF($AV:$AZ,"*A9270*"),"A9270 By definition this is a HCPCS for non-covered services. Need instruction on benefit response.  Authorization has this code.", IF(SUM(COUNTIF($AV:$AZ,{"*Fluoride*","*Dental*","*Oral*","*Teeth*"}))>0," Analysis required. Claims with Dental codes.","Analysis Required"))

Open in new window

0
 

Author Comment

by:Culwatrnca11
ID: 41780060
yes same statement as fluoride, even if dental, oral or teeth are found.
0
 
LVL 32

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41780070
Then the suggested formula would work for you.
0
 

Author Comment

by:Culwatrnca11
ID: 41780103
Neeraj,

Worked perfectly..  Thank you very much.  can you tell me what the * means or does?

,{"*Fluoride*","*Dental*","*Oral*","*Teeth*"}))>
0
 
LVL 32

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41780124
* is a wildcard character. e.g. in *Fluoride* means there maybe some characters before Fluoride and after Fluoride.
But if your cells contain only Fluoride, you may remove the * from the formula.
0
 
LVL 32

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41780128
You're welcome. Glad to help.
0
 

Author Comment

by:Culwatrnca11
ID: 41780136
Thank you for explaining... makes sense now. take care
0
 
LVL 32

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41780141
You're welcome.
Thanks and you too.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question