+ Reply to Thread
Results 1 to 10 of 10

Update a cell with drop-down values based on cell values within a range.

  1. #1
    Registered User
    Join Date
    06-26-2023
    Location
    QLD, Australia
    MS-Off Ver
    2019
    Posts
    5

    Update a cell with drop-down values based on cell values within a range.

    I have a cell that has drop-down values that I would like to be updated based on values in a specific range. So, if a cell has "yes" then a specific text would appear in the cell that has the drop-down list.

    I have an If formula that works just fine when the cell doesn't have a drop-down value, but need it to work in a cell that does have a drop-down value. Any suggestions?

    This is my If formula
    =IF(["at symbol"[Year 7]]="Yes","Year 7",IF(["at symbol"[Year 8]]="Yes","Year 8",IF(["at symbol"[Year 9]]="Yes","Year 9",IF(["at symbol"[Year 10]]="Yes","Year 10",IF(["at symbol"[Year 11]]="Yes","Year 11",IF(["at symbol"[Year 12]]="Yes","Year 12",""))))))

    NB: "at symbol" is literally the "at" symbol, but i wasn't allowed to post with that symbol in the formula.

    In the above example:
    Cell G2 would equal "Year 8" because cell B2 equals "Yes"
    Cell G3 would equal "Year 10" because cell D3 equals "Yes"

    A B C D E F G
    1 Year 7 Year 8 Year 9 Year 10 Year 11 Year 12 What Year are you in
    2 No Yes No No No No Cell with drop-down list
    3 No No No Yes No No

  2. #2
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Update a cell with drop-down values based on cell values within a range.

    Please try

    =TEXTJOIN("",1,IF(A2:F2="Yes",$A$1:$F$1,""))

    Not sure, I'm use Excel 2016, it's didn't support TEXTJOIN

    Regards

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,967

    Re: Update a cell with drop-down values based on cell values within a range.

    Welcome to the forum.

    Something like:

    =INDEX($A$1:$F$1,match("Yes",$A2:$F2,0))

    Provide a workbook if you need futher help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    06-26-2023
    Location
    QLD, Australia
    MS-Off Ver
    2019
    Posts
    5

    Re: Update a cell with drop-down values based on cell values within a range.

    Hi AliGW and menem
    Maybe I have put my question in the wrong thread. I do have a formula that works, the problem is the cell I want to put it in won't allow me to enter the data. So even if both of your formulas worked, I still can't use it in the cell that has the set value list.
    Any idea how I can implement a formula in a cell that is only prepared to accept values from a drop-down list?
    My drop-down list is defined, I just need to tell the cell which value to select based on results in the range.
    Thanks

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,967

    Re: Update a cell with drop-down values based on cell values within a range.

    Why do you need a drop-down list in a cell that needs to be automatically calculated? Remove the drop-diwn list and replace it with the formula - you don't need and cannot have both. A drop-down list is designed to aid manual data entry.

  6. #6
    Registered User
    Join Date
    06-26-2023
    Location
    QLD, Australia
    MS-Off Ver
    2019
    Posts
    5

    Re: Update a cell with drop-down values based on cell values within a range.

    It's related to a template being used to import and export data from a database.
    OK. Understand, I can't add a formula to a cell that has a drop-down. That solves that problem then! I thought I must've been missing something.
    Cheers

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,967

    Re: Update a cell with drop-down values based on cell values within a range.

    Well, that's not strictly true, actually. You can, but it will only work once and you'd have to remove the DV settings and then reapply them.

    I can't think of any reason why data import would require a drop-down list - as I said before, they are only there to assist manual data entry.

  8. #8
    Registered User
    Join Date
    06-26-2023
    Location
    QLD, Australia
    MS-Off Ver
    2019
    Posts
    5

    Re: Update a cell with drop-down values based on cell values within a range.

    yeah, I hear what you are saying and probably agree with you. I was just using the template that the system downloads and it's kinda coded in to the excel spreadsheet.
    I'll be able to work around it I think.
    Thanks again for your time helping me.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,967

    Re: Update a cell with drop-down values based on cell values within a range.

    Weird - so what's stopping you simply removing it and replacing it with a formula after downloading?

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  10. #10
    Registered User
    Join Date
    06-26-2023
    Location
    QLD, Australia
    MS-Off Ver
    2019
    Posts
    5

    Re: Update a cell with drop-down values based on cell values within a range.

    AliGW - Thanks for your Forum advice to this forum newbie. LOL

+ 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. Change drop down list color cell based on range of values
    By KARKHI in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2022, 01:13 PM
  2. Replies: 1
    Last Post: 08-18-2020, 01:59 AM
  3. Return values to specific columns based on range of cell values
    By sbrt10 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-27-2019, 03:15 AM
  4. Find and update multiple sheet tabs with new data based on range of cell values.
    By robcgp1200 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-20-2017, 04:59 PM
  5. Need help making a macro to copy range of values based on cell values.
    By zolton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2013, 08:58 AM
  6. [SOLVED] Update respective cell values in the table based on Multiple Drop Down list selections.
    By nileshpatil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2012, 09:30 AM
  7. [SOLVED] Drop Down list range based on two different cell values
    By Jaywuzhere in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2012, 05:22 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