# Auto enter text based on the results of two other cells.

I want cell U16 to display 4 types of text (Type B,C,D,E) based on the text values of two other cells T12 (0.05 value) and R16 (moderate or steep value)

my cases are
Type B >0.05 & Moderate
Type C <0.05 & Moderate
Type D >0.05 & Steep
Type E <0.05 & Steep

I am trying to use If/And statement but keep getting 0? Not sure it is the most elegant solution

=IF(AND(T12=">0.05, therefore treat as Hill/Ridge",R16="Moderate"),U16="Type B"),IF(AND(T12="<0.05, therefore treat as Escarpment",R16="Moderate"),U16="Type C"),IF(AND(T12=">0.05, therefore treat as Hill/Ridge",R16="Steep"),U16="Type D",U16="Type E")

###### 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
=IF(T12=">0.05; therefore treat as Hill/Ridge",IF(R16="Moderate","Type B","Type D"),IF(R16="Moderate","Type C","Type E"))
0
Author Commented:
Mmm. I can see your logic here, but if I end up with cell T12=>0.05; therefore treat as Hill/Ridge and R16 = moderate, I end up with Type C instead of a Type B
0
Commented:
Type C is when T12 is not ">0.05; therefore treat as Hill/Ridge"
So check the text in T12.
Or just compare the ">" like this
=IF(LEFT(T12,1)=">",IF(R16="Moderate","Type B","Type D"),IF(R16="Moderate","Type C","Type E"))
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.

Author Commented: