+ Reply to Thread
Results 1 to 20 of 20

Data Validation List

  1. #1
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Data Validation List

    I would like to have a drop down list that shows only the labor category types if a user chooses Civil Servant or Onsite Contractor. I think this can be done with an offset formula but I'm not sure.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    Create a Named Range called DD (very imaginative DD = Drop Down). Ctrl F3 to view edit:

    =INDEX(Sheet1!L:L,AGGREGATE(15,6,ROW(Sheet1!$M$2:$M$48)/(Sheet1!$L$2:$L$48=Sheet1!O7),1)):INDEX(Sheet1!L:L,AGGREGATE(14,6,ROW(Sheet1!$M$2:$M$48)/(Sheet1!$L$2:$L$48=Sheet1!O7),1))

    Then select DD as the List in the data validation in your yellow cells.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Re: Data Validation List

    Hello,

    I tried your formula but I get an error message. When I downloaded your file the yellow cells do not display the dropdown list showing all the categories for Civil Servant Labor or for Onsite Contractor

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    Works perfectly here.

    What version of Excel are you using?

  5. #5
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Re: Data Validation List

    I switched to a newer version of Excel and it works fine but actually columns P and Q are in a different worksheet called 'Contamination FTE&WYE'. I tried to change the formula to:
    INDEX(Sheet1!M:M,AGGREGATE(15,6,ROW(Sheet1!$M$2:$M$48)/(Sheet1!$L$2:$L$48='Contamination FTE&WYE'!F3),1)):INDEX(Sheet1!M:M,AGGREGATE(14,6,ROW(Sheet1!$M$2:$M$48)/(Sheet1!$L$2:$L$48='Contamination FTE&WYE'!F3),1))

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    You should have said that from the start!!

    Anyhow. Check that the ranges in the Named Range haven't adjusted themselves to something daft!!

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    will work. I $'d a few ranges to miniminse the risk of the Named Range going strange... see sheet.
    Attached Files Attached Files

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Data Validation List

    Administrative note
    Please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version. Your profile does not indicate your version.
    Thanks

  8. #8
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Data Validation List

    Because your data is sorted, you may try this formula in data validation list (Q2)

    Please Login or Register  to view this content.
    Regards.
    Last edited by menem; 10-20-2019 at 05:52 AM. Reason: Add code tags

  9. #9
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Re: Data Validation List

    Column P and Q will be in another worksheet called "Contamination FTE&WYE". Columns L & M are in worksheet called Labor Rates: Where it says P2 do I change that too 'Contamination FTE&WYE'!F3,'Labor Rates'!$L$L?

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    I would advise you NOT to use INDIRECT. It is a volatile function and recalculates every time ANYTHING changes on the sheet. It can cause performance issues.

    Any other important things we don't yet know???
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Data Validation List

    @Glenn, thanks for your advise. ^_^
    I never know about the side effect before. T_T

    Regards.

  12. #12
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Re: Data Validation List

    When I take the formula and paste it into a different excel file and change 'Contamination FTE&WYE" to 'GDS FTE&WYE' and change Sheet1 to 'Labor Rates' it gives me an error. Everything else stays the same.
    INDEX(Sheet1!$M:$M,AGGREGATE(15,6,ROW(Sheet1!$M$2:$M$48)/(Sheet1!$L$2:$L$48='Contamination FTE&WYE'!$F3),1)):INDEX(Sheet1!$M:$M,AGGREGATE(14,6,ROW(Sheet1!$M$2:$M$48)/(Sheet1!$L$2:$L$48='Contamination FTE&WYE'!$F3),1))

  13. #13
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Data Validation List

    You have change 'Sheet1' to 'Labor Rates' , did you change this part in the formula also ?

    Regards.

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    Lady123,

    Menem is correct, and if you open and look at the attachment in Post 10, you will see that I did that for you already.

  15. #15
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Re: Data Validation List

    Yes, I did change Sheet 1 to 'Labor Rates' and changed Contamination FTE&WYE to GDS FTE&WYE. All the $L and $M and $F3 are correct.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    I cannot diagnose what I cannot see...

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    One thought... Just check that Excel hasn't put " " around rgenamed range formula. If it has, remove them

  18. #18
    Registered User
    Join Date
    08-07-2018
    Location
    Maryland
    MS-Off Ver
    10
    Posts
    16

    Re: Data Validation List

    Hello, Attached is my file where the Data Validation is not working. I have over 20 files that I would like to paste the code. The tab names and rows could be different from each spreadsheet. The $F3 could be $E2 or $G3

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Data Validation List

    Well, there were two things wrong. One I can explain... the other I have never seen before....

    1. Tab: GDS FTE&WYE Delete the space before the G.

    2. (Bizarre). Select G3. Open the Named Range (CTRL-F3). delete the = at the start of the formula. Type it in again. Close and save the Named range Dialogue Box. it works.
    Attached Files Attached Files

  20. #20
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,612

    Re: Data Validation List

    For Data validation
    For J2:J3

    =OFFSET(INDEX($E$2:$E$48,MATCH($I2,$B$2:$B$48,0)),0,0,COUNTIF($B$2:$B$48,$I2))

    For Q2:Q3

    =OFFSET(INDEX($M$2:$M$48,MATCH($P2,$L$2:$L$48,0)),0,0,COUNTIF($L$2:$L$48,$P2))
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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] VBA to Prevent Data Entry in Cell with Data Validation List - Two Criteria Validation
    By AliGW in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 05-25-2019, 11:48 AM
  2. Replies: 1
    Last Post: 01-14-2018, 11:04 AM
  3. Replies: 3
    Last Post: 06-04-2015, 02:27 PM
  4. [SOLVED] Data Validation: How to clear/delete the content of the cell and not Data Validation List?
    By lukelucky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2015, 09:42 AM
  5. Replies: 4
    Last Post: 12-19-2013, 10:44 AM
  6. Adding Date Data Validation to cells with List Data Validation
    By biggtyme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2013, 09:47 AM
  7. Replies: 3
    Last Post: 04-11-2011, 05:52 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