+ Reply to Thread
Results 1 to 2 of 2

Validation on Pasted Values

  1. #1
    Registered User
    Join Date
    01-03-2005
    Posts
    35

    Validation on Pasted Values

    Hi,

    I've got a spreadsheet with some list validation (ie user picks one of several possible values) which works great

    However, this is going to be dealing with quite large amounts of data, so I've got a macro that will populate the data in the column (ie pastespecial values)

    This has the problem that validation is only applied when users type data, and not when pasting data in
    As in this problem:
    http://www.excelforum.com/excel-gene...en-pasted.html

    What I'd like to do is either find some way to apply validation to pasted data (so to trigger excel into running validation on the pasted data), or highlight data which doesn't match one of the listed validation entries .

    I think I could probably attempt the second option here via a macro, but in order to do this I'd need to:
    A) work out how to determine if a cell contains validation rules via VBA, or
    B) work out how to do a logical test to see if a value is contained within the named range which contains my list items for the drop down list (I can get it to do this via a loop to compare to each individual value, but given the amount of data involved, I'm just wondering if there's a simpler/more efficient way to do this)

    Can anyone help me with either of these please?

    Thanks!

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,332

    Re: Validation on Pasted Values

    If you loop through the cells and check the Validation.Value, this will return True if the criteria are met (and by extension, if there are no criteria).
    Everyone who confuses correlation and causation ends up dead.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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