We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Advice on Excel

Cotta
Posts: 3,667 Forumite
in Techie Stuff
Hi All,
I've a little Excel query and I can't quite solve. What I have is in column "A" a list of job titles and in column B I need to convert these into specific titles.
So for example if Column A mentions "football" I need to convert this into "footballer," if column A mentions Food I need to convert this into Chef otherwise I need to return "other".
How do I write this code as none of my formulas are working?
I've a little Excel query and I can't quite solve. What I have is in column "A" a list of job titles and in column B I need to convert these into specific titles.
So for example if Column A mentions "football" I need to convert this into "footballer," if column A mentions Food I need to convert this into Chef otherwise I need to return "other".
How do I write this code as none of my formulas are working?
0
Comments
-
=IF(ISNUMBER(SEARCH("food",A1)),"Chef",IF(ISNUMBER(SEARCH("football",E15)),"Footballer","Other"))
Apparently the ISNUMBER function is required because of how SEARCH works - see here: http://www.mrexcel.com/forum/excel-questions/659723-nested-if-statement-search-find-text.html0 -
You'd be better off having a lookup table somewhere and then using VLOOKUP or INDEX/MATCH to bring back the correct response for each term.
It would be quite easy to keep it up to date as well rather than having a (possibly) huge formula depending on the number of options.:wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:
Any posts are my opinion and only that. Please read at your own risk.0 -
I wondered about using lookup, but if the OP wants any word or phrase containing "food" to come back as chef, would it mean you'd need to list every possible combination to make it work?0
-
Possibly, or you could use an array formula (that would take a while to calculate).
The good thing about using a lookup is that you could just add to it as necessary as new words came in.:wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:
Any posts are my opinion and only that. Please read at your own risk.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 351.7K Banking & Borrowing
- 253.4K Reduce Debt & Boost Income
- 454K Spending & Discounts
- 244.7K Work, Benefits & Business
- 600.1K Mortgages, Homes & Bills
- 177.3K Life & Family
- 258.4K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.6K Read-Only Boards