Anju, Your query requires a special effort to achieve. However, there are many macros available who will extract text or numbers from a given cell but I am afraid they will not work for you without being edited as per your specific requirements. For example, a simple number extract macro will extract 022439028 from your second line.
I am proposing you a workaround which I got from Internet exactly does not extract on the basis of format of string but on the basis on number where the string exists. I have detailed this UDF in the attached file. Let me know if this solves your purpose. Best, AJ On Sun, Apr 11, 2010 at 7:00 PM, anju <> wrote: > 1 > Booking 5546935512 adfafasjfahf > 2 > PONU022439-0 tonnes of instant full cream milk powder with 28 > percent butter fat. > 3 > cont TTNU942301-1 full cream milk with 28 percent butter fat. > > > i want to pull specific string like > > from line 1 nos 5508556545 (it can be anywhere) > from line 2 PONU022439-0 (It can be anywhere) format first four > alphabet , six numbers, hyphen and number > from line 3 TTNU942301-1 (It can be anywhere) format first four > alphabet , six numbers, hyphen and number > > I treid using instr function.. > > Also can we use wild cards with instr function > > Thanks in advance > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our Facebook Group @ > http://www.facebook.com/group.php?gid=287779555678 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,800 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > > To unsubscribe, reply using "remove me" as the subject. > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe
Extract the nth value from a Cell.xls
Description: MS-Excel spreadsheet