View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph David Biddulph is offline
external usenet poster
 
Posts: 618
Default Using the AND and OR functions in the same formula

"Jan Buckley" wrote in message
...
I need to create a formula that says IF LEFT(A1,1)="7" AND LEFT(C1,1)="A"
OR
LEFT(C1,1)="T" OR LEFT(C1,1)="G", THEN CONCATENATE(A1,B1,C1)

I don't know if I can use AND and OR in the same formula, or how to string
it all together. Help, please. Thank you.


Assuming that you intend AND to take precedence over OR, and that you want
your answer cell to be blank if the condittion isn't met, then try:
=IF(OR(AND(LEFT(A1,1)="7",LEFT(C1,1)="A"),LEFT(C1, 1)="T",LEFT(C1,1)="G"),CONCATENATE(A1,B1,C1),"")

Otherwise, shuffle the formula accordingly.
--
David Biddulph