Results 1 to 7 of 7

Validation value cell update logic

Threaded View

  1. #1
    Registered User
    Join Date
    01-07-2015
    Location
    Leicester, England
    MS-Off Ver
    2013
    Posts
    3

    Validation value cell update logic

    Hi

    In an excel sheet I have built some dynamic selection lists where the tier1 selection drives the tier2 & tier 3 available lists (tier 3 is a static list that has the same 7 entries for all tier 2 responses, which are also valid for all tier1 responses). At the moment only valid values for the tier2 field appear when tier1 is populated from a list.

    I'm now trying to complete add some validation logic & automated corrections to update the sheet (tier2 & tier3 field) if and when the validation.value for tier2 is False. Is there a way to use the validation.value check to determine/select a cell and then update the tier3 value

    Code I've been playing with attached below, the Active.Cell select statement picks the first cell in the defined range, not the cell detected as invalid, is there a way to move the select to the invalid data cell and loop down the range clearing all related tier3 values before clearing all invalid tier2 values

    Sub DeleteInvalidData()
    'Columns("M:M").Select
    Range("M1:O20").Select
    Dim C As Range
    For Each C In Selection
    'changes column 2 row 1 only
    If C.Validation.Value = False Then ActiveCell.Select
    ActiveCell.Offset(0, 2).Value = "Choose..."
    'removes invalid entry values from range
    If C.Validation.Value = False Then C.Value = ""
    Next
    End Sub

    Thanks
    Last edited by shelby_335; 01-08-2015 at 12:03 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Update certain Cell based on clicking one data validation box
    By bcn1988 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2012, 02:37 PM
  2. [SOLVED] Cell Update on Data Validation Selection
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2012, 03:32 PM
  3. Excel 2007 : Update links logic loop error
    By edmdas in forum Excel General
    Replies: 0
    Last Post: 02-02-2010, 01:24 PM
  4. Update a validation list based on value of another cell
    By JDM11808 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-05-2009, 07:53 PM
  5. [SOLVED] Update Validation List from cell
    By pkeegs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2006, 11: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