Find and Replace with wild cards

  • Thread starter Thread starter skmc
  • Start date Start date
S

skmc

I have the following type of numbers/sqequence 1234-4567, which i want to
search for (????~-????), this works, but now i want to keep ONLY the 1st 4
numbers (i.e.) 1234 and discard the remaining (i.e.) -4567. Any help would be
appreciated!!
 
I assume 1234-4567 is just a sample number.

You can use the below formula to get rid of the numbers from the hyphen

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

If this post helps click Yes
 
Assuming your "numbers" only have one dash in them, select the cells you
want to do the replace operation on, then click Edit/Replace on the menu bar
and put -* (that is a dash followed by an asterisk) in the "Find What" field
and leave the "Replace With" field empty, then hit the "Replace All" button.
 
Back
Top