View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default If statement for alpha numeric combo AND numeric only

You dont need a formula. Try the below

Select the column.
Hit Ctrl+H to find and replace CR with -
From menu DataText to ColumnsNextNext hit Advanced button
Make sure 'Trailing minus sign' is checked.
Hit finish

If this post helps click Yes
---------------
Jacob Skaria


"Jdude" wrote:

I need a formula that will strip out an alpha from a number:
B1=12,562.25CR
B2=25,235.44

I want one formula in column C that will do two things.
1) if there is a CR, take it off and multiply the remaining value by (-1)
=LEFT(B1,SEARCH("cr",B1)-1)*(-1)
2) if there isn't a CR, just give me the value in that cell

the expected results for the above would be:
C1= -12,562.25
C2= 25,235.44