#1   Report Post  
Posted to microsoft.public.excel.misc
JM JM is offline
external usenet poster
 
Posts: 37
Default If Statement

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statement

Maybe

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

Mike

"JM" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
JM JM is offline
external usenet poster
 
Posts: 37
Default If Statement

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.

"Mike H" wrote:

Maybe

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

Mike

"JM" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statement

Yes you can do that like this

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

Mike

"JM" wrote:

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.

"Mike H" wrote:

Maybe

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

Mike

"JM" wrote:

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?

  #5   Report Post  
Posted to microsoft.public.excel.misc
JM JM is offline
external usenet poster
 
Posts: 37
Default If Statement

works great. Thank you Mike

"Mike H" wrote:

Yes you can do that like this

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

Mike

"JM" wrote:

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.

"Mike H" wrote:

Maybe

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

Mike

"JM" wrote:

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?



  #6   Report Post  
Posted to microsoft.public.excel.misc
JM JM is offline
external usenet poster
 
Posts: 37
Default If Statement

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


"JM" wrote:

works great. Thank you Mike

"Mike H" wrote:

Yes you can do that like this

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

Mike

"JM" wrote:

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.

"Mike H" wrote:

Maybe

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

Mike

"JM" wrote:

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?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default If Statement

Look up the function OR() in Excel help.
--
David Biddulph

"JM" wrote in message
...
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"))


"JM" wrote:

works great. Thank you Mike

"Mike H" wrote:

Yes you can do that like this

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

Mike

"JM" wrote:

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.

"Mike H" wrote:

Maybe

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

Mike

"JM" wrote:

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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum if statement with a left statement Eric D Excel Discussion (Misc queries) 4 July 23rd 08 05:31 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"