+ Reply to Thread
Results 1 to 3 of 3

Drop down with a preselect based on formula

  1. #1
    Registered User
    Join Date
    07-16-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    13

    Drop down with a preselect based on formula

    Using Google Sheets


    A1 contains a value.
    B1 has a dropdown menu of associated attributes for A1.
    I would like to put a formula in B1 that puts a value from the drop down menu in B1 based on the value in A1.
    This way after entering value in A1 the most likely corresponding value is automatically in B2 but, if I want to overwrite it, I can just select a different value from the dropdown.
    Is there any way to have a data validation dropdown and a formula in 1 cell? Or a workaround to accomplish something similar.

    Thanks!

    Shawn

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Drop down with a preselect based on formula

    You can't have both a formula and data in the same cell. You can set up a validation and then put a formula in that cell, but as soon as you use the list, you lose the formula.

    You can accomplish this result with VBA. When you enter the value in Cell A1, the code can populate a value into cell B1, even if B1 has a validation in it. Attaching a sample workbook would help. Also we'd need some rules on how to determine what the "most likely" value would be.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Drop down with a preselect based on formula

    Oops. Sorry. I just noticed you said Google Sheets. In that case, I don't know. Maybe. Google sheets are barely good enough to display text values and simple formulas.

+ 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. Best formula for SUM based on drop down menu
    By toci in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-13-2016, 02:59 AM
  2. [SOLVED] Preselect items on a userform listbox
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 04-18-2016, 05:57 AM
  3. Preselect does not highlite the listbox item
    By Warbe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2015, 09:57 AM
  4. [SOLVED] Preselect Listboxes based on Option button selection
    By Biffer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2014, 04:59 AM
  5. [SOLVED] Preselect 2 Listboxes from 2 worksheets
    By Biffer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2014, 02:39 PM
  6. [SOLVED] I have a sort macro. How to add script to preselect rows to sort based on column value?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-09-2014, 02:25 AM
  7. preselect ALL items in Listbox
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2009, 11:58 AM

Tags for this Thread

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