Using 'IF' and 'THEN' formula.

TheRadioBoy

New Member
Joined
Feb 19, 2018
Messages
7
Hi, could someone please help me?

If I wanted to display set text depending on the entry in a certain cell, how would I go about that please?

Say in my entry cell of E7 the word 'INTERNAL' was input, I'd like the phrase 'ACCEPTED' to be displayed in cell E17. If 'EXTERNAL' was to be input then I'd like the phrase 'NOT ACCEPTED' to be displayed at E17.

Is this a fairly easy process that I can adapt to other text.

I am quite new to formulas and am just getting to grips with the basics.

Many thanks for any advice you can offer!

Rob :rolleyes:
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
in E17

=if(E7="INTERNAL","ACCEPTED","NOT ACCEPTED")

or

=IF(E7="INTERNAL","","NOT ")&"ACCEPTED"
 
Last edited:
Upvote 0
Try this in E17:
Code:
=IF(ISNUMBER(SEARCH("INTERNAL",E7)),"ACCEPTED",IF(ISNUMBER(SEARCH("EXTERNAL",E7)),"NOT ACCEPTED",""))
 
Upvote 0
Thank you very much! I really appreciate your help!

I suspected it would be something straightforward, I'm just a bit dim!
 
Upvote 0
Note the main two differences in the proposed solutions:

If the value in E7 is NOT "INTERNAL" or "EXTERNAL", Alan's solution will return "NOT ACCEPTED" while mine will return nothing (blank).

You didn't say what you wanted to happen if E7 was neither "INTERNAL" or "EXTERNAL", so we just made different assumptions on what you want to happen there. Choose the one that suits you best.
 
Upvote 0
Note the main two differences in the proposed solutions:

If the value in E7 is NOT "INTERNAL" or "EXTERNAL", Alan's solution will return "NOT ACCEPTED" while mine will return nothing (blank).

You didn't say what you wanted to happen if E7 was neither "INTERNAL" or "EXTERNAL", so we just made different assumptions on what you want to happen there. Choose the one that suits you best.

Again, many thanks - that's really helpful if any text other than 'INTERNAL' is now input I can display 'NOT ACCEPTED' ... I never considered that.

I'm somewhat astounded as to how adaptable Excel is - I never realised it was quite so powerful, for all different scenarios. I think I should get myself on a proper course or night-class.

Rob.
 
Upvote 0
You are welcome!
I'm somewhat astounded as to how adaptable Excel is - I never realised it was quite so powerful, for all different scenarios.
Yes, and there are often many different possible solutions to a problem, especially when you get into VBA.
It really is quite powerful and flexible!:)
 
Upvote 0
Yes, and there are often many different possible solutions to a problem, especially when you get into VBA.
It really is quite powerful and flexible!:)

Oh yes, I'd love to learn VBA too!

Taking your formula suggestion further, can that input string be expanded to have multiple conditions that would return 'ACCEPTED' and 'NOT ACCEPTED' for instance having 'INTERNAL', 'IN-HOUSE' or 'LOCAL' as the inputs for E17 to return 'ACCEPTED' and say 'EXTERNAL', 'OUTSOURCED' or 'NATIONAL' that would return 'NOT ACCEPTED'.

It gives me scope then to look at using that formula for other text inputs.
 
Upvote 0
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top