How to create a formula

Gordon Hughes
Gordon Hughes used Ask the Experts™
on
I have an excel spread sheet that has a column with either b, g or r
I would like to create a formula in a separate column which will convert this to either Blue, Green or red

Gordon
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
Hi,

pls try
=INDEX({"Blue";"Green";"Red"},MATCH(A1,{"b";"g";"r"},0))

Open in new window

Regards
Top Expert 2016
Commented:
shorter
=HLOOKUP(A1,{"b","g","r";"Blue","Green","Red"},2)

Open in new window

Gordon HughesDirector

Author

Commented:
ALL WORKS GREAT

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial