If Statement

J

JM

I am looking to add an if statement where if I use one value, it will produce
the information from one cell, and if I enter a different value it would take
info from a second cell.

Example: A1 = Value 1, A2 = Value 2, A3 is the if statement, and A4 is the
cell with the variable. For the IF statement in the A3 cell, it would be
based on the following information. If A4 has the word "yes", it would pull
info from A1. If A4 has the value "No", it would pull info from A2. How
would I do this?
 
J

JM

Hi Mike,

This works perfectly, I didn't include the undefined part which threw me
off.

Can I extend this if statement by asking if Y or yes, would provide a1, if
No, or N would provide a2.
 
M

Mike H

Yes you can do that like this

=IF(LEFT(A4,1)="Y",A1,IF(LEFT(A4,1)="N",A2,""))

Mike
 
J

JM

One more question if someone can help. Based on below. Looking to see if
I can change this statement. If a4 = "yes", or "please do", then return a1.
if a4 = "no" or "maybe not", then return a2.

=IF(A4="Yes",A1,IF(A4="No",A2,"Unspecified"))
 

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