+ Reply to Thread
Results 1 to 12 of 12

Excel 2007 : Truncation and search

  1. #1
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Truncation and search

    Hello everyone - I am new here and new to Excel 2007.
    Where I work we need to do an inventory of all Laptops and desktops. To save time I would like to create an excel macro that will trunc off un-needed info and also do a search to locate a found asset. Below is an example:

    Raw data = 1s64585kul3d7275
    data removed = 1s64585ku
    whats left = l3d7275

    I would like it to search my document for = l3d7275 so that I may verify the asset has been found ( I can bold it, etc.)

    Is this possible to do or... ?
    Any help would be greatly appreciated.

    Thank you!

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Truncation and search

    Hi,

    Yes ... it can be done ...
    What determines the portion to be truncated ...? is it the length ...?

  3. #3
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Truncation and search

    Yes- I would like it to retain only the last 7 characters (Alpha Numeric).

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Truncation and search

    Hi,

    With your raw data in A1, this in B1

    =RIGHT(A1,7)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Truncation and search

    AH! I see. And if I want to enter all raw data in A and have B retain the last 7 digits would it be along the lines of:

    =RIGHT(A#,7)

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Truncation and search

    Hi,

    If your list of raw data is in column A, then put the formula in B1 and auto-fill by double-clicking the fill handle (little black square on selected B1 cell)

  7. #7
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Truncation and search

    Hmm ok -

    What if I wanted to use column "A" to input all raw date and have it output only the last 7 characters in "B" colume? (See Below). Is your formula =RIGHT(A,7) ??

    \1

  8. #8
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Truncation and search

    Got it :-D~!

    Can you have excel do a search after it leaves the last 7 characters to see if that entry is already on the spreadsheet? Example - when I use the barcode scanner it will input the raw data then leave only the last 7 characters. Can the last 7 characters be searched to see if they already exist on my sheet?

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Truncation and search

    Hi,

    If you haven't got many you could try using Edit > Find?

  10. #10
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Truncation and search

    Hundreds :-)

    I like making my life (and my co-workers lives) easier.

    We couldn't for the life of us figure out the formula to merely remove all but the last 7 characters! Silly us :-P

    Can you recommend any books to help smarten us up some?

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Truncation and search

    Hi,

    Take a look at the list of links below my signature there plenty in there to look at. Also look the the video links

  12. #12
    Registered User
    Join Date
    12-28-2009
    Location
    Dresden, NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Truncation and search

    EExxxcellent. Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1