+ Reply to Thread
Results 1 to 2 of 2

Validation of values in 3 columns based on set criterias

  1. #1
    Registered User
    Join Date
    01-20-2020
    Location
    Seattle
    MS-Off Ver
    Office 2013
    Posts
    2

    Validation of values in 3 columns based on set criterias

    I'm very novice when it comes to VBA, and have been struggling setting some data validation and having it adjust the users input.

    I have 3 columns, on columns I, J, and K with 36 rows where a user can input numbers. The value in column I, must fall between the values in J and K. The value in J must be less than or equal to K, and thus inversely, the value in K must be greater than J.

    To add a 3rd twist, the difference between the values of K and J must not exceed 7,200.

    The tricky part is it needs to work regardless of what column the user inputs values first.

    I have this for loop with if statements that frequently crashes Excel. This code is in the Worksheet_Change event handler.

    Please Login or Register  to view this content.
    The first 2 If statements work fine, it does what is intended by ensuring the value in column I always false between J and K and automatically adjusting them if the value in I changes.

    Where I'm struggling is with the latter part of the code which is where the crashing is happening.

    Any help would be greatly appreciated.

  2. #2
    Registered User
    Join Date
    01-20-2020
    Location
    Seattle
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Validation of values in 3 columns based on set criterias

    I think I figured out a way that works, using column I as the basis for all criteria.

    Please Login or Register  to view this content.
    If anyone has any suggestions though feel free to chime in.

+ 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] Data validation list based on criterias
    By Imbizile in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2017, 04:56 AM
  2. Sum values based on two criterias
    By HI808 in forum Excel General
    Replies: 9
    Last Post: 05-12-2017, 02:04 AM
  3. Lookup values based on two criterias
    By sagarh in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2015, 07:49 AM
  4. Data Validation based on the values entered in two other columns.
    By staljunk in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-31-2014, 07:32 PM
  5. [SOLVED] Averaging Columns Containing 0s Based On 2 Criterias
    By mattdh12 in forum Excel General
    Replies: 4
    Last Post: 10-13-2014, 10:38 AM
  6. Obtaining Values Based on 2 Criterias
    By ankitdkabra in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2014, 05:59 AM
  7. Values based on three criterias
    By inayat in forum Excel General
    Replies: 7
    Last Post: 10-17-2011, 04:38 AM

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