# 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
###### Who is Participating?
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.

Commented:
Try this formula'

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

EE-sample.xlsx
0
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","")))
``````
And copy down.
0

Experts Exchange Solution brought to you by

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

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.
0
Commented:
Ah, I see what you mean sktneer. In that case, your formula is what I'd go with.

0
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...
0
Author 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
0
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.
0
###### 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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.