+ Reply to Thread
Results 1 to 4 of 4

Using data validation to pick Item number

  1. #1
    Registered User
    Join Date
    08-04-2014
    Location
    Maryland
    MS-Off Ver
    2010
    Posts
    5

    Using data validation to pick Item number

    First sheet is where our evaluator enters item numbers, I currently vlookup filling in the description and cost based on item#.

    Living Room
    Item# | Description | cost | install cost ect.........
    330 | Cordwraps | $1.25 | $1.00
    2263 | Tip Resistant Furniture Tether | $3.00 | $2.50


    Second sheet:

    Product sheet:
    Item # | Discription | Cost | install Cost | Prodlist (used for data validation)
    66 |Professional Furniture Straps | $8.00 | $10.00 | 66 -- Professional Furniture Straps

    I have a data validation drop down showing prodlist (66 -- Professional Furniture Straps) to help evaluators pick item based on the description if they don't know the item#. My vlookup only works on (item#).

    How can I get the dropdown that shows (66 -- Professional Furniture Straps) insert just the "Item number" (66) when selected?

    Thanks
    Terry

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

    Re: Using data validation to pick Item number

    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using data validation to pick Item number

    To do this without VBA will require you to do some legwork in your main Sheet2 listing that acts as the source for the Data Validation. For this to work the values in sheet source range must contain NUMBERS ONLY (this is important, this trick does not work with text strings).

    The way we accomplish this is by creating a custom Number Format for each and every cell in our source range. It's a bit of work, but gives you the exact results you want.

    For example:

    1)on Sheet2, in A2 and A3 you could enter the numbers

    66
    67

    The numbers must be unique, of course.

    2) Now click on A2 and press CTRL-F1 to open the Cell Format window.

    3) On the Number Format tab, create a CUSTOM number format of "66 -- Professional Furniture Straps" including the quotes shown.

    4) Repeat with A3 and apply a custom number format of "67 -- Something Else"

    5) Now those cells APPEAR to have the text values you entered showing in the cells when you look on the sheet, but if you click on the cell and look in the Formula Bar you still see the only thing IN the cells is the numbers you typed originally.

    6) Now create a data validation drop down list using these cells as the source.

    7) When you USE the drop down, you will see the TEXT values in the drop down, but when you make a selection, it actually only brings into that cell the VALUE from the source cell, so you will get the number only.

    Pretty slick trick, huh?

    So, get to work, it will take a while to create the custom number formatting for each cell in your source range, fortunately you only have to do it once.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    08-04-2014
    Location
    Maryland
    MS-Off Ver
    2010
    Posts
    5

    Re: Using data validation to pick Item number

    That worked great, but some item# have text in them and the original custom numbering's not working. I've tried adding "@" in numerous places but still nothing.

    G1000 -- Center Gateway Pressure Gate

    Thanks

+ 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. Replies: 4
    Last Post: 07-26-2014, 04:52 AM
  2. Replies: 1
    Last Post: 10-09-2013, 11:44 AM
  3. how to add item to Data Validation list by VBA?
    By adds007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2011, 01:24 PM
  4. Data validation, Non-useable item
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2007, 04:08 PM
  5. Replies: 1
    Last Post: 03-14-2006, 10:25 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