0
votes

I am trying to create a conditional 'If' formula in excel. If a cell contains the value WhiteBall.png, I want the cell next to it be populated with "win" (or "Lose" if it does not.

I cannot get the formula to work. I'm using Excel 2011 for Mac. Please see below. Thanks for your help.

=IF(E4=WhiteBall.png,”Win”,”Lose”)

I have also tried this formula:

=IF(E4="WhiteBall.png",”Win”,”Lose”)
1
your second formula looks correct. There may be a trailing or leading space...or both. Try putting your E4 in TRIM() and/or CLEAN(). =IF(TRIM(CLEAN(E4))="WhiteBall.png",”Win”,”Lose”)Forward Ed
Thanks Forward Ed. No extra spaces. With the formula your proposed, I get a #Name error just as I did with mine. I'm thinking it might have something to do with the fact that it's referring to an image file - .pnguser8553155
E4 is also the outcome of a formula. I'm not sure if that makes a difference.user8553155
Retype the second formula from scratch in a new cell. the quotes are not the ones recognized by Excel.Scott Craner
Thanks Scott. I have just retyped it as follows: =IF(E5="WhiteBall.png","Win","Lose") It will not calculate.user8553155

1 Answers

0
votes

=IF(E4="WhiteBall.png","Win","Lose") see the screenshot