+ Reply to Thread
Results 1 to 7 of 7

Converting text in a drop down list to a specific # in another cell

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2016
    Posts
    24

    Converting text in a drop down list to a specific # in another cell

    I have a row of 15 cells, each with a drop down list of names (company names that work at our site to be more precise). I another area of the sheet, I would like a number to show based on whatever company is chosen from the drop down list. For example: A1 has a drop down list of 10 companies, I choose xyz company; in cell E1 I would like it to automatically show "1" (each company already has a number assigned to it.) In that row there are 15 cells like this with the same 10 names on a drop down list. Throughout the day, this may be repeated over 100 times, each time with different names selected and in different orders.

    Any help would be greatly appreciated

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting text in a drop down list to a specific # in another cell

    If on another sheet, you have the company codes (i.e. sheet2!A1:B15) like so
    Excel 2010
    Row\Col
    A
    B
    1
    abc
    1
    2
    def
    2
    3
    xyz
    3
    Sheet: Sheet2
    Then in the cell where you want the code to show up

    with dropdown in A1
    =IFERROR(VLOOKUP(A1, sheet2!$A$1:$B$15,2, FALSE),"")
    Is that what you are asking for?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Converting text in a drop down list to a specific # in another cell

    =IFERROR(INDEX($J$1:$J$10,MATCH(A1,$A$1:$A$10,0)),"")

    Please refer the attached sheet.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting text in a drop down list to a specific # in another cell

    Actually if your company values are numeric from 1 to 15, then you'd just need MATCH
    =MATCH(A2, Sheet2!$A$1:$A$15,0)

    Or if you want to get fancy, you can use a forms Combo box from the Developer tab for your dropdown box and set your output cell to E1

  5. #5
    Registered User
    Join Date
    12-27-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2016
    Posts
    24

    Re: Converting text in a drop down list to a specific # in another cell

    Neither of thos really accomplished what I am looking for. I fear the fault is mine. I have attached a version of my actual form. You will see the rows with (color shaded) the drop down list (rows 14, 28,43,57 to be exact). To the right of the is shows what I would like it to look like. The the immediate right of that you will see a colored in area numbered from 1-30 (this is my end-game idea to get to)

    This colored in are to the far right represents an actual tag/receipt given out once they leave the site showing their entry fee. The color of the tag (pink,Blue or Golden-Rod (not shown)) coordinates with the actual tags we hand out (Pink is for a $5 tag, Golden-Rod for a $20 tag and Blue for a $33 tag.

    So, in the end; what I would like to do is make selections on the drop down lists and they show up in the colored are with their totals filling in the cells next to the appropriate House number (1-30) and the color of the area matching the price of the actual tag we hand out (Just as cells B18, B33, B47 and B64 do now)

    Thanks again guys, your the best
    Attached Files Attached Files
    Last edited by Shawn4789; 04-12-2016 at 12:36 PM. Reason: forgot to attach the form

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting text in a drop down list to a specific # in another cell

    Okay, so where do the 15 and 2 come from?? Rigo's is the 23rd name in your list.

  7. #7
    Registered User
    Join Date
    12-27-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2016
    Posts
    24

    Re: Converting text in a drop down list to a specific # in another cell

    The numbers associated with each house were/are assigned at the corporate level and have nothing to do with position on a list

+ 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. [SOLVED] Place text in a specific cell based on two separate drop down list entries
    By fazthfc in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-24-2015, 03:34 PM
  2. Replies: 2
    Last Post: 08-02-2013, 08:04 AM
  3. Replies: 3
    Last Post: 10-06-2012, 03:58 PM
  4. Display specific text in a new cell after selecting from a drop down menu
    By Robeert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2012, 07:53 AM
  5. Replies: 21
    Last Post: 08-13-2012, 01:52 PM
  6. VBA to select specific Text in Drop Down List
    By woolen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2012, 09:37 AM
  7. VBA to select specific Text in Drop Down List
    By woolen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2012, 05:20 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