Solved

How to place an X in a cell if the previous has Y or Z or T in MS Excel

Posted on 2013-10-23
10
400 Views
Last Modified: 2013-10-23
Hello,

I want to place an X in cell B if cell A has text abc OR acb OR fgr.

I have have hunted high and low for a formula for this, but could find it.

Ho do you do that with a formula?

Thanks!
0
Comment
Question by:Brejinski
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 18

Expert Comment

by:Steven Harris
Comment Utility
Combine the IF OR functions:

=IF(OR(A1="abc", A1="acb", A1="fgr"), "X", "")
0
 

Author Comment

by:Brejinski
Comment Utility
Thanks, ThinkSpaceSolutions, but let me try to be clearer: in fact the text in cell A has a lot of other texts. It's like this: fddgdgdgdf abc fdfdf.
0
 
LVL 12

Expert Comment

by:Alan3285
Comment Utility
Hi,

One way:

B1=IF(ISERR(FIND("abc",A1))+ISERR(FIND("acb",A1))+ISERR(FIND("fgr",A1))<3,"X","")

If you add more strings to look for, increase the '3' to '4' or however many you include.

FIND is case-sensitive, so use SEARCH instead if you want non-case-sensitive.

HTH,

Alan.
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
Try using SEARCH like this

=IF(COUNT(SEARCH({"abc","acb","fgr"},A1)),"X","")

As Alan says, SEARCH is not case-sensitive. if you want case-sensitivity switch to FIND

regards, barry
0
 
LVL 12

Expert Comment

by:Alan3285
Comment Utility
Barry's is better :-)

But do note the case-sensitive thing on FIND vs SEARCH.

Thanks,

Alan.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 18

Expert Comment

by:Steven Harris
Comment Utility
Nice one Barry.
0
 

Author Comment

by:Brejinski
Comment Utility
Still not working for me... Maybe because my Excel has another language. I am uploading the worksheet here to see if you guys can help a little bit more.

The "sentences" are in column A and the words I am searching in it are "Corsa" OR "Classic" OR "Celta".
18-COMPRA.xlsm
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
Comment Utility
So I put this version in B2 copied down

=IF(COUNT(SEARCH({"Corsa","Classic","Celta"},A2)),"X","")

see attached

regards, barry
18-COMPRA-barry.xlsm
0
 

Author Closing Comment

by:Brejinski
Comment Utility
Great! Thank you very much!
0
 
LVL 12

Expert Comment

by:Alan3285
Comment Utility
{Ignore - Posted in error}
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now