ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find and Replace with wild cards (https://www.excelbanter.com/excel-discussion-misc-queries/237063-find-replace-wild-cards.html)

skmc

Find and Replace with wild cards
 
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!!

Stefi

Find and Replace with wild cards
 
Try 1234*

Regards,
Stefi

skmc ezt *rta:

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!!


Jacob Skaria

Find and Replace with wild cards
 
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
---------------
Jacob Skaria


"skmc" wrote:

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!!


Rick Rothstein

Find and Replace with wild cards
 
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.

--
Rick (MVP - Excel)


"skmc" wrote in message
...
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!!




All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com