#1   Report Post  
James
 
Posts: n/a
Default IF statement - Help!

I have three columns of data, column A, B & C.

I want to write an IF statement that looks at column A,
and if it either retruns the contents of column B or
column C depending on the match.

eg.
Column A Car
Column B Non public transport
Column C Public transport

If column A = "Car" then return "Non public transport"
else
return "Public transport"



  #2   Report Post  
Rowan
 
Posts: n/a
Default

In Cell D1 enter =IF(A1="Car",B1,C1)
Copy down as required.

Regards
Rowan

"James" wrote:

I have three columns of data, column A, B & C.

I want to write an IF statement that looks at column A,
and if it either retruns the contents of column B or
column C depending on the match.

eg.
Column A Car
Column B Non public transport
Column C Public transport

If column A = "Car" then return "Non public transport"
else
return "Public transport"




  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi James

is this what you're after
=IF(A1="Car",B1,C1)

Cheers
JulieD

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"James" wrote in message
...
I have three columns of data, column A, B & C.

I want to write an IF statement that looks at column A,
and if it either retruns the contents of column B or
column C depending on the match.

eg.
Column A Car
Column B Non public transport
Column C Public transport

If column A = "Car" then return "Non public transport"
else
return "Public transport"





  #4   Report Post  
James
 
Posts: n/a
Default

Many thanks (again) JulieD and Rowan.


-----Original Message-----
I have three columns of data, column A, B & C.

I want to write an IF statement that looks at column A,
and if it either retruns the contents of column B or
column C depending on the match.

eg.
Column A Car
Column B Non public transport
Column C Public transport

If column A = "Car" then return "Non public transport"
else
return "Public transport"



.

  #5   Report Post  
JulieD
 
Posts: n/a
Default

you're welcome ...
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"James" wrote in message
...
Many thanks (again) JulieD and Rowan.


-----Original Message-----
I have three columns of data, column A, B & C.

I want to write an IF statement that looks at column A,
and if it either retruns the contents of column B or
column C depending on the match.

eg.
Column A Car
Column B Non public transport
Column C Public transport

If column A = "Car" then return "Non public transport"
else
return "Public transport"



.



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
How to calculate a sum as one outcome of an IF statement barb in NC Excel Worksheet Functions 2 March 31st 05 08:01 PM
What statement to use? Paul Excel Worksheet Functions 6 February 13th 05 05:23 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM


All times are GMT +1. The time now is 05:44 PM.

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"