Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with excel IF statement

Status
Not open for further replies.

peitzza

Technical User
Apr 13, 2000
80
US
is it possible to make an IF statement that comes back with a value like: &quot;yes&quot;, if it looks at a cell in another column and sees a word with ()around it like:(computer)?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;any help would be greatly appreciated!<br>thanx, Peter<br>
 
I don't know the best way of doing this; however, here are a couple of ideas:<br><br>This formula will return Yes if the first char in A1 is a &quot;(&quot;<br><br>=IF(LEFT(&quot;A1&quot;,1)=&quot;(&quot;,&quot;Yes&quot;,&quot;No&quot;)<br><br>This formula will return Yes if the last char in A1 is a &quot;(&quot;<br><br>=IF(RIGHT(&quot;A1&quot;,1)=&quot;(&quot;,&quot;Yes&quot;,&quot;No&quot;)<br><br>The next one returns Yes if there is a &quot;(&quot; anywhere in A1<br><br>=IF(FIND(&quot;(&quot;,A1)&gt;0,&quot;Yes&quot;,&quot;No&quot;)<br><br>Finally this one returns yes if the first and last characters of A1 are &quot;(&quot; and &quot;)&quot; respectively.<br><br>=IF(AND(LEFT(A1,1)=&quot;(&quot;,RIGHT(A1,1)=&quot;)&quot;),&quot;Yes&quot;,&quot;No&quot;)<br><br>Hope you can do something with this lot<br><br>Jonathan <p> Jonathan<br><a href=mailto:j.w.george@virginnet.co.uk>j.w.george@virginnet.co.uk</a><br><a href= > </a><br>Working with: Visual Basic 6, Access 97, Visual Interdev 6, VBScript, Active Server Pages, SQL Server 6.5, Oracle 7
 
thanx so much the last one worked great! peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top