Adding text to equal text

F

Frank

Is ther a way to add two cells with text to equal another cell that contains
text?

basic example:

cell:yellow + cell:green = cell:blue

I have multiple choices for information that I would like to be able to add
together (ex. yellow and green)to equal an already established answer,(ex.
blue). Can I assign numeric values to these text cells so a formula will work?
 
C

Cam1234

You could use an IF function. For example if A1:yellow and B1:green, and you
wanted C1 to say blue, then you could try the formula
=IF(A1="yellow",IF(B1="green","Blue",""),""). This formula would return Blue
in whatever cell you placed it in (C1 in this example), and would return
nothing if either A1:B1 was different or blank.
I hope this helps!
 
C

Cam1234

In place of "Blue" you could just put D5 (withouth the quotation marks). The
formula will now put in C1 whatever you enter in D5 - if yellow is in A1 and
green is in B1. The formula would now look like this:
=IF(A1="yellow",IF(B1="green",D5,""),""). Does this help?

Cam
 
F

Frank

Thanks for the input, here is a follow up question

What if Blue is already another cell value (D5) this example. Using your
example could you have the formula return (D5) in cell (C1) if A1=yellow, and
B1=green.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top