+ Reply to Thread
Results 1 to 10 of 10

Cell based drop down and text

Hybrid View

  1. #1
    Registered User
    Join Date
    04-03-2014
    Location
    bangalore
    MS-Off Ver
    Excel 2007/10
    Posts
    11

    Cell based drop down and text

    Hi All,

    If I select Yes in "D2", a dop down has to come in "C4", if I again change the D2 to N/A the C4 has to change to "N/A" automatically

    Screenshot_30.png
    Attached Files Attached Files
    Last edited by sahana108; 07-14-2021 at 06:05 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell based drop down and text

    You can't have both a drop down and also a formula that references another cell without using a macro.

    Is this the whole story though. Do E2:G2 have similar drop downs to which C5:C7 are dependent.

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-21-2013
    Location
    Nakskov
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Cell based drop down and text

    You can only make it work once.

    Make a list in datavalidate (Data--> Datavalidate) with N/A;Yes;No in cell C4
    Then Write =IF(D2="N/A";"N/A";"Y") in C4
    Then delte N/A from the list in datavalidate

    IT Works as long at you only change i D2 and not choce on the list in C4. When you do that, the IF-formula disapeares.

    A Macro will be more solid.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-03-2014
    Location
    bangalore
    MS-Off Ver
    Excel 2007/10
    Posts
    11

    Re: Cell based drop down and text

    Thanks for your input Birthel.

    I have tried with name manager, the problem is when we change the parent cell drop-down list getting updated and leaving the text what we have selected last time.

    I need only when I select N/A the destination has to N/A if I select Yes a drop-down of Yes No and if I select again N/A the drop-down to disappear and N/A should come.

    Would appreciate if any suggestions. Thank you..!!

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell based drop down and text

    What's the answer to the question in #2?

  6. #6
    Registered User
    Join Date
    04-03-2014
    Location
    bangalore
    MS-Off Ver
    Excel 2007/10
    Posts
    11

    Re: Cell based drop down and text

    Hi Richard,

    I have uploaded a new file in my original post, can you please check now. Thanks

  7. #7
    Registered User
    Join Date
    05-21-2013
    Location
    Nakskov
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Cell based drop down and text

    Hi
    You can't lock cells by chosing in a datavalidation.
    You have to use a control and submit a macro.

    (developer)
    Attachment 740609
    Attachment 740610

    (The screen are from Danish Excel, but til buttons are at the same place)

    It can be something like this:

    With ActiveSheet.Range("C4").Validation
    .Delete
    .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
    xlBetween, Formula1:="Y,N"
    .IgnoreBlank = True
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = ""
    .InputMessage = ""
    .ErrorMessage = ""
    .ShowInput = True
    .ShowError = True
    End With

    and to lock:
    ActiveSheet.Range("C4").Locked = True

    Best regards.

  8. #8
    Registered User
    Join Date
    04-03-2014
    Location
    bangalore
    MS-Off Ver
    Excel 2007/10
    Posts
    11

    Re: Cell based drop down and text

    Hello Birthel,

    Thanks for your coding.

    Can I please have the working sheet?

    Thank you.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell based drop down and text

    Why not just have the drop downs in C4:C7 with the N/A as the first of the three items.

    It/s not clear what your D2:G2 dropdowns achieve. One way or another you will be selecting either NA, Yes or No. At the moment you're just adding to the number of selections you need to make.

  10. #10
    Registered User
    Join Date
    05-21-2013
    Location
    Nakskov
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Cell based drop down and text

    I am sorry that it has taken a little time - i was on holliday last week.
    Yes - if I can upload it :-) (new i the forum)
    Attached Files Attached Files
    Best Regards

    Birthe

+ 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] clear data validation drop down based on text in another cell
    By lilsnoop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2021, 12:36 PM
  2. Text box to populate based on drop-down list cell value while sheet is "protected".
    By rxharp419 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-30-2017, 06:40 PM
  3. [SOLVED] copy cell text based on drop down value selected from another cell
    By weistroit in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-27-2016, 06:37 PM
  4. [SOLVED] Change cell text based on text (from drop-down) in another cell
    By mintymike in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2015, 10:48 AM
  5. [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
  6. Replies: 2
    Last Post: 01-12-2015, 02:27 AM
  7. Replies: 1
    Last Post: 02-19-2014, 10:04 PM

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