Thread
:
What statement to use?
View Single Post
#
3
JE McGimpsey
Posts: n/a
One way:
=IF(LEFT(A1,3)="at ",A1,"Rogers Centre")
Note that I used 3 since Atlanta starts with "at".
In article ,
(Paul) wrote:
Let's say I have two cells - one contains "Boston Red Sox" and the
other contains "at Boston Red Sox". One denotes a home game and one
denotes an away game. I want a statement that will look at the cell
and if the first two letters are "at" I want to return the original
cell and if the "at" is not present, to return a value of "Rogers
Centre" even though it will always be the SkyDome in our hearts!
Using FIND, "at" returns a value of 1 which I can use in an IF
statement. The problem I have is that "at" is not present as the first
two letters it returns #VALUE! and if "Seattle Mariners" is in the
cell, the FIND statement returns a value of 3. I don't need to know
where the "at" is, I just want to know if it is present as the first
two characters in the cell! What is the best way to do this? With all
the time I have spent working on a solution, I could have done it
manually but I really would like to know!
Reply With Quote