False Statement won't show

  • Thread starter spiz via OfficeKB.com
  • Start date
S

spiz via OfficeKB.com

some of my data has - a, - b
i'm using this to pull out the hyphens, but if the statement is false, the
data will not return the original cell if the original cell does not contain
a "-"

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1,cell)

it is, however, pulling the info, minus the ending parts after the "-"
beautifully.
Any ideas?
 
D

Dennis

You are missing a closing bracket for your Left function

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1),cell)
 
T

Tim879

try this to return the data after the "-"

=IF(ISERROR(FIND("-",A1)),A1,LEFT(A1,FIND("-",A1)-1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top