# Numbers 3.6: Change text depending on value

Newbie here!

I'm trying to find a function so when I enter a value in one cell (A1) it gives me a predetermined word in another cell (A2). The values are ranges (0-19, 20-39, 40-59, 60-79 & 80<) in another table (A1-B1 to A5-B5) and each has a different word associated to them (C1-5).

Can anyone help?

To be honest, your question is a little unclear, so If I've misunderstood it please clarify.

What you need is a formula in A2 that is something like the following:

``````=IF(A1="0-19",C1,IF(A1="20-39",C2,IF(A1="40-59",C3,IF(A1="60-79",C4,IF(A1="80<", C5,"N/A")))))
``````

The above formula should display in A2 the text you have in cells C1:C5 depending on what's in A1. For example, if A1 = "40-59" then A2 will display whatever text is in cell C3.

However, if you meant that the formula should work so that the text in cell C3 displays in cell A2 if A1 is any value from 40 up to 59, then the formula would be along these lines:

``````=IF(A1<=19,C1,IF(A1<=39,C2,IF(A1<=59,C3,IF(A1<=79,C4,IF(A1>=80,C5,"N/A")))))
``````