Excel formula based on specific entries in another column

I would like a formula for Column C, based on Column B data, as follows:
If Column B = LINK to #### (ie., LINK to 4566), return a blank cell in Column C
If Column B = Yes, return the word 'Mail' in Column C
If Column B = No, return the word 'Hold' in Column C

I have attached a sample spreadsheet as well, illustrating what I am looking for.

Thanks!
Andrea
EE-sample.xlsx
AndreamaryAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tj aCommented:
Try this formula'  

=IF(B2="####","",IF(B2="Yes","Mail",IF(B2="No","Hold","")))

Open in new window


Just put your desired link where I have ####
EE-sample.xlsx
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Try this....

In C2
=IF(AND(LEFT(B2,4)="LINK",ISNUMBER(RIGHT(B2,4))),"",IF(B2="Yes","Mail",IF(B2="No","HOLD","")))

Open in new window

And copy down.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
@Takunda Jora

I don't think that this is the case. OP wants to show blank only if the B2 contains LINK to <four digits> i.e. #### in his example could be any number if I am not wrong.

Your formula will show the desired output but not because B2 meets the criteria but only because no criteria is met and it shows a blank. Evaluate your formula and you will know this.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Tj aCommented:
Ah, I see what you mean sktneer. In that case, your formula is what I'd go with.

Sorry about that. :)
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
No need to say sorry. It happens with all of us later or sooner that we get confused by the description. No issues. Cool...
AndreamaryAuthor Commented:
Thanks very much, sktneer, for both your solution and feedback on the other formula suggested, as I wouldn't have realized it may not work...most helpful!

Cheers,
Andrea
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Andrea! Glad I could help. :)
I only analyzed the other formula because it was returning the desired output while the formula was not correct and you could easily misguided because of the results returned.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.