View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Trying to use IF statement with hyphen

Maybe...

=if(mid(data!$i$2,3,1)="-","",data!$i$2)

AmytDev wrote:

I"m struggling with trying to get this function to work.
=IF((LEFT(Data!$I$2,3))="-","",((Data!$I$2)))

If the third character is a hyphen, I want the data in the cell to be blank
otherwise, I want the value of I2 in that cell.

Any ideas?
Amy


--

Dave Peterson