+ Reply to Thread
Results 1 to 6 of 6

Linked Data Validation Cells

  1. #1
    Registered User
    Join Date
    07-13-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Linked Data Validation Cells

    Working on a project where the user must enter the Refrigerant Type. There are three ways to identify a Refrigerant, the Number, Chemical Name, and Chemical Formula. I want to create three separate Data Validation Cells for each Identification method. If they decide to choose the Refrigerant by the Number, then Chemical Name and Chemical Formula should be automatically selected depending on the corresponding number. If they decide to choose Refrigerant by the Chemical Name, then Number and Chemical Formula should be automatically selected, etc.

    Capture.PNG

    The attached image is a small sample of Refrigerants that I would like to include.

    Any help would be appreciated!!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,977

    Re: Linked Data Validation Cells

    To put data validation in a cell means that the user is going to type in data. To have it automatically set a value based on another cell means it has to have a formula. You can't have both in the same cell.

    That means that you need a macro. I can help further if you provide your actual file. Under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-13-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Linked Data Validation Cells

    The "Refrigerants" worksheet lists the majority(EDIT: Now complete list) of refrigerants that I'm working with. The next sheet labeled "Sample" is the same list given in the screenshot.
    Haven't edited the worksheet to look presentable, if the data seems unorganized, I pulled the information from this website that may be clearer to read:

    https://www.ashrae.org/standards-res...t-designations

    Your help is very much appreciated!
    Attached Files Attached Files
    Last edited by 6StringJazzer; 07-13-2017 at 03:08 PM. Reason: no need to quote

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,977

    Re: Linked Data Validation Cells

    You have two different lists on the Refrigerants sheet. I am just using the first one, because that matches your sample.

    First I created three named ranges: NumberList, ChemicalNameList, ChemicalFormulaList. I used these to create the three cells with Data Validation that the user can select from.

    I added a VBA Sub called Worksheet_Change that will detect when the user selects one of the three values. When that happens, it looks up the other two values and fills them in.

    If you change anything about how the Refrigerants sheet is organized, or anything about how the Select sheet is organized, the code needs to be updated to reflect the changes.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-13-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Linked Data Validation Cells

    Extremely helpful!! Exactly what I was looking for, thank you very much!

    Is there a way I can view the said VBA Sub, Worksheet_Change? I would like to study the code so that I can apply it to the second list or adjust the lists if needed. Or if there were any references that you used that I could utilize as well.
    Last edited by dtpham; 07-14-2017 at 07:01 AM. Reason: Deleted quote

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,977

    Re: Linked Data Validation Cells

    (Use quotes when needed to clarify what you are replying to but please don't quote an entire post with each reply. Quotes tend to clutter a thread.)

    I don't know how much to explain because I don't know how much you know to start with. I can't give you a single reference for VBA but I first learned it from an excellent book by John Walkenbach.

    Take a look here, and go to the code for the Refrigerants sheet.

+ 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. Data Validation on Linked Cells
    By gugmi01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-24-2015, 09:41 AM
  2. [SOLVED] Data Validation - Linked to each other
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2014, 10:55 AM
  3. Linked/mirrored Data Validation
    By mcayea in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-12-2014, 01:09 PM
  4. data validation linked with pivot table
    By albert28 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-04-2013, 09:01 PM
  5. Saving data in cells linked to data validation list
    By anonDymous in forum Excel General
    Replies: 0
    Last Post: 03-12-2013, 02:18 PM
  6. Data Validation for linked cell
    By gilbert in forum Excel General
    Replies: 1
    Last Post: 06-13-2011, 05:24 AM
  7. [SOLVED] Linked cells with validation
    By Micos3 in forum Excel General
    Replies: 9
    Last Post: 02-14-2006, 05:30 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