+ Reply to Thread
Results 1 to 10 of 10

Data Validation based on Cell Contents

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    142

    Data Validation based on Cell Contents

    Hi,

    I have two columns;
    ...Column F: Free entry date (I enter a date when a ticket has been closed)
    ...Column G: This currently contains a data validation list called 'Strike'

    What I want to do is set the data validation is column G so that;
    If F2 is empty then G2 has contains the validation list
    If F2 is not empty then "Cleared" is entered into G2

    I have tried
    Please Login or Register  to view this content.
    within the Data Validation setup, sometimes it works and other times it doesn't and I can't work out why.
    I have also tried the same funtion as an IF statement within the cell itself which doesn't work at all.

    Hope someone can help, thanking you all in advance.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: Data Validation based on Cell Contents

    What's the purpose of the validation list? How is it used prior to the date being entered into F2?
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,861

    Re: Data Validation based on Cell Contents

    Create named range "Cleared" with a single entry of "Cleared"

    In DV

    Allow: List

    Source:

    =IF(F2<>"",Cleared,Strike)

  4. #4
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    142

    Re: Data Validation based on Cell Contents

    Firstly, thank you both for your quick responses....

    AliGW: I run weekly scans, the DV list is a strike option. Listed is Strike 1, Strike 2 & Strike 3. Coloumn F is the date that I close the ticket. I want the system to overwrite the DV list and automatically add 'Cleared' when I enter the close date in column F.

    JohnTopley: I want the word 'Cleared' to appear automatically overwriting whatever is in the column G cell, although your suggestion works if I wanted to DV lists, it doesn't work for what I want it to do - thank you.
    Last edited by mowens74; 04-12-2018 at 02:28 AM. Reason: Added further comments

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

    Re: Data Validation based on Cell Contents

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,861

    Re: Data Validation based on Cell Contents

    You will need VBA to do what you require.

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

    Re: Data Validation based on Cell Contents

    Agreed.

    Mowens74 - would you like me to move the thread for you?

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,861

    Re: Data Validation based on Cell Contents

    Further question:

    when "G2" is "Cleared" i.e has text "Cleared", then is the DV for G2 now "dead" i.e will not be used again?

  9. #9
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    142

    Re: Data Validation based on Cell Contents

    JohnTopley: Yes, once G2 is set to 'Cleared', the DV list will no longer be needed for that row.

    Yes, if it is only possible via VBA then please could you move this thread.


    Thank you.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,861

    Re: Data Validation based on Cell Contents

    Please Login or Register  to view this content.
    Right click on tab, "View Code". copy and paste code

    See attached
    Attached Files Attached Files

+ 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 contents of validation based on a cell
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2016, 08:33 AM
  2. Replies: 3
    Last Post: 06-29-2015, 03:03 PM
  3. Data Validation Cell based on previous Data Validation Cell?
    By Dessesbo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2015, 11:42 PM
  4. Replies: 3
    Last Post: 10-09-2014, 02:51 AM
  5. Data validation based on another cells contents
    By Baabaa in forum Excel General
    Replies: 5
    Last Post: 09-09-2014, 07:26 AM
  6. Data Validation based on contents of other cells
    By MrCraig in forum Excel General
    Replies: 2
    Last Post: 11-02-2013, 09:39 AM
  7. Use a data validation list to determine another cell's contents
    By jstn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2012, 10:37 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