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")

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Ejgil HedegaardCommented:
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"))
vipamanAuthor 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
Ejgil HedegaardCommented:
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"))

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
vipamanAuthor Commented:
Succinct answer. Thank you.
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.