+ Reply to Thread
Results 1 to 12 of 12

Searching for Inventory Number in a String

  1. #1
    Banned User!
    Join Date
    03-18-2014
    Location
    Louisiana
    MS-Off Ver
    Excel 365
    Posts
    56

    Searching for Inventory Number in a String

    Could anyone tell me how to make a formula that will pull out my inventory number from a string? The inventory numbers can be anywhere from 3 characters to 8. Please note that only in this example are the preceding "G" is present. Sometimes the inventory number is at the end of the string. TIA!

    G BM1240 Bookmark $9.00
    G MB16 Men's Bracelet $23
    G CC1225 Car Charm $12
    G FRB1323 Full Rosary Bracelet $35
    G E1330 Earrings $8
    G B2174 Bracelet $13
    G AR9 Anglican Rosary $17
    G SC2030 Stethoscope Charm $10
    G R1452 Rosary $31
    G ODR1428 One Decade Rosary $11
    G CC1248 Car Charm $13.00
    G PR1444 Pocket Rosary $11
    G RB1545 Rosary Bracelet $14
    Last edited by roxdrob01; 11-12-2017 at 03:47 PM. Reason: Incomplete Title

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Searching

    title updated
    Last edited by protonLeah; 11-12-2017 at 04:47 PM.
    Ben Van Johnson

  3. #3
    Banned User!
    Join Date
    03-18-2014
    Location
    Louisiana
    MS-Off Ver
    Excel 365
    Posts
    56

    Re: Searching for Inventory Number in a String

    Is that better?

  4. #4
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Searching for Inventory Number in a String

    if you are using excel 2013 or 2016, did you try flash fill..?

  5. #5
    Banned User!
    Join Date
    03-18-2014
    Location
    Louisiana
    MS-Off Ver
    Excel 365
    Posts
    56

    Re: Searching for Inventory Number in a String

    2016, no I haven't. How do I do that? I need a formula

  6. #6
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Searching for Inventory Number in a String

    you could use:
    in B1=MID(A1, FIND(CHAR(160),A1)+1, FIND(CHAR(160), A1, FIND(CHAR(160),A1)+1) - FIND(CHAR(160),A1)-1)

  7. #7
    Banned User!
    Join Date
    03-18-2014
    Location
    Louisiana
    MS-Off Ver
    Excel 365
    Posts
    56

    Re: Searching for Inventory Number in a String

    Thank you very much. Unfortunately I'm getting a #Value! error using that.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Searching for Inventory Number in a String

    You should post a better sample showing the various cases
    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!

  9. #9
    Banned User!
    Join Date
    03-18-2014
    Location
    Louisiana
    MS-Off Ver
    Excel 365
    Posts
    56

    Re: Searching for Inventory Number in a String

    Why do I get the feeling I'm being nit-picked to death. I'll be happy to leave this forum. This ProtonLeah has made me feel very unwelcomed with all of her "rules". I've never been to a forum run by a Nazi before. Good day and sorry I bothered you.

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Searching for Inventory Number in a String

    Quote Originally Posted by roxdrob01 View Post
    Why do I get the feeling I'm being nit-picked to death. I'll be happy to leave this forum. This ProtonLeah has made me feel very unwelcomed with all of her "rules". I've never been to a forum run by a Nazi before. Good day and sorry I bothered you.
    ProtonLeah has reason to ask you to change the title like "Searching" . Now the title is OK, but ask you to post more records in order to deeply understanding your data.
    Anyway, what is your data rule:
    Does the Inventory Number : 1 to 3 uppercase letters and following by 1 to 4 digits?
    Quang PT

  11. #11
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Searching for Inventory Number in a String

    Such a long formula, but it should solves your issue:
    With A1 contains string:
    Please Login or Register  to view this content.

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  12. #12
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Searching for Inventory Number in a String

    Try this
    Enter in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 G BM1240 Bookmark $9.00 BM1240
    2 G MB16 Men's Bracelet $23 MB16
    3 G CC1225 Car Charm $12 CC1225
    4 G FRB1323 Full Rosary Bracelet $35 FRB1323
    5 G E1330 Earrings $8 E1330
    6 G B2174 Bracelet $13 B2174
    7 G AR9 Anglican Rosary $17 AR9
    8 G SC2030 Stethoscope Charm $10 SC2030
    9 G R1452 Rosary $31 R1452
    10 G ODR1428 One Decade Rosary $11 ODR1428
    11 G CC1248 Car Charm $13.00 CC1248
    12 G PR1444 Pocket Rosary $11 PR1444
    13 G RB1545 Rosary Bracelet $14 RB1545
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Name searching
    By tapsmiled in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-05-2016, 07:54 AM
  2. Searching across and up/down
    By Ditch1983 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 03-09-2015, 06:11 AM
  3. [SOLVED] Searching for a Value
    By NatalieEC in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-27-2015, 12:36 PM
  4. Searching
    By cruise in forum Excel General
    Replies: 1
    Last Post: 02-16-2011, 01:01 PM
  5. Searching
    By calaban007 in forum Excel General
    Replies: 2
    Last Post: 01-20-2011, 12:18 PM
  6. [SOLVED] searching
    By Tracy A in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] searching
    By Tracy A in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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