+ Reply to Thread
Results 1 to 12 of 12

Help with Data validation and list with formula

  1. #1
    Registered User
    Join Date
    09-09-2011
    Location
    Germany, Wuerzburg
    MS-Off Ver
    Excel 2010
    Posts
    11

    Question Help with Data validation and list with formula

    Hi guys,

    Long time since I have posted anything.
    I need your help, I am trying to make a simple planning sheet.

    I have a workbook with 2 sheets.
    1.sheet contains Columns : Day Date Time Class Teacher Covered
    2. sheet contains the availability of teachers. so all columns start with a date and the rows contain the name.
    A row therefore looks like this.

    7/1
    Harley

    Lidia
    Livia
    Thais
    Salete
    Carla


    My issue:
    The 1.sheet has a column Teacher, now in this column I want to have a drop down list. (E2, E3, E4, E5 ... etc..)
    This list is depended on the date which is in column B.

    Essentially I want the list to look up date in its row go to the second sheet and give me all the possible names in it. That is all.
    Is this possible ?


    .. See my attachment.
    Attached Files Attached Files
    Last edited by compspider; 06-30-2014 at 11:11 AM.
    :: Skill is a state of mind ::

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Data validation and list with formula

    Hi,

    It is my understanding that Validation lists cannot be populated using formulas, but rather only static data. There is a possible solution available using VBA if you would be interested.

    Let me know and I will be happy to help you out

  3. #3
    Registered User
    Join Date
    07-01-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Help with Data validation and list with formula

    hi,

    i tried and possible to use index and match for validation data list.
    please use this formula on E2..

    =INDEX(Avaliability!$B$3:$AH$12,,MATCH($B2,Avaliability!$B$1:$AH$1,0))

    regards,

  4. #4
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Help with Data validation and list with formula

    Hi,

    I had updated the file with necessary changes as u requested and it is working fine for me


    Punnam
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Data validation and list with formula

    Yes you can use a formula, sorry that was my mistake. However, your formula will only return a single value. What you want is the OFFSET function. Highlight column E2:72 and enter this formula in the Data Validation List source entry field:
    Please Login or Register  to view this content.

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Help with Data validation and list with formula

    see the attached file
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Registered User
    Join Date
    09-09-2011
    Location
    Germany, Wuerzburg
    MS-Off Ver
    Excel 2010
    Posts
    11

    Thumbs up Re: Help with Data validation and list with formula

    I love you guys.
    Thank you so much. I can take it from here.
    My wife probably wants more changes if I get stuck I will come back to you all.

    Thank you once again.

  8. #8
    Registered User
    Join Date
    09-09-2011
    Location
    Germany, Wuerzburg
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Help with Data validation and list with formula

    Hi Silva,

    Would you be able to explain the formula?

    =INDIRECT("Avaliability!"&CHAR(MATCH(B74,Avaliability,0)+64)&4&":"&CHAR(MATCH(B74,Avaliability,0)+64)&10)

    why 64 and 4 : 64 and 10

    Maybe if you can explain what excel is doing at each step I can use the formula later on in other instances.

    Thank you in either case.

  9. #9
    Registered User
    Join Date
    09-09-2011
    Location
    Germany, Wuerzburg
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Help with Data validation and list with formula

    Quote Originally Posted by Punnam View Post
    Hi,

    I had updated the file with necessary changes as u requested and it is working fine for me


    Punnam

    Hi Punnam,

    Sorry perhaps you posted it first so I wanted to ask you.
    Would you be able to explain the formula?

    =INDIRECT("Avaliability!"&CHAR(MATCH(B74,Avaliability,0)+64)&4&":"&CHAR(MATCH(B74,Avaliability,0)+64)&10)

    why 64 and 4 : 64 and 10

    Maybe if you can explain what excel is doing at each step I can use the formula later on in other instances.

    Thank you in either case.

  10. #10
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Data validation and list with formula

    Hi compspider,

    Let me take a stab at explaining this formula for you:
    1. Availability (named range): Punnam has defined this named range as Availability!$A$1:$AH$1
    2. MATCH(B74,Availability,0): this will return the column number on the Availability worksheet that represents the date in cell B74
    3. CHAR(): this function takes an integer and converts it to a character according to your computer's character set. In most instances, CHAR(65) = A, CHAR(66) = B and so on. Hence, by adding 64 to the MATCH formula, the CHAR function will return the column letter
    4. The 4 and the 10 that you ask about are the top and bottom rows of the range of names on the Availability sheet that you want in the drop-down list, and the colon indicates that everything to the left is the start of the range, and everything to the right is the end of the range
    5. INDIRECT: this function converts text to an Excel range.

    In my opinion, this is actually quite a messy way to return a range, when a simpler and faster OFFSET/MATCH formula can also be used to return the same result. (Note that an INDEX/MATCH won't work here, as this will return a single value. Instead of INDEX, I use OFFSET to return an entire range).

    I hope this helps

    If this solves your problem, please don't forget to mark this thread as solved, and please click on the * next to my post to say thanks. If you do decide later that you need some more help with this same problem, please start a new thread, as often people will unsubscribe from your thread once it is marked as solved, so you are more likely to get the help you need by starting a new thread.

    Thanks

  11. #11
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Help with Data validation and list with formula

    @Ajryan

    Thanks for the explanation .

    1) My intention is to help in the best way i can do, i am not having any idea of "Offset" & its use, if u think any part of my solution is messy, u can be replaced with " Offset " guide me. i am open to learn.

    Punnam

  12. #12
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Data validation and list with formula

    Hey no problems Punnam. I wasn't being critical. Just that I learnt a lot from this website before becoming a contributor myself, so now I do my best to pass that knowledge back to the people who are now in the position that I used to be in.

    Have a great day

+ 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. Replies: 0
    Last Post: 01-09-2013, 11:44 AM
  2. Replies: 3
    Last Post: 07-20-2012, 09:52 AM
  3. Data Validation List by Formula
    By kborgers in forum Excel General
    Replies: 9
    Last Post: 01-02-2011, 08:57 AM
  4. HELP: Data > Validation ---List ----Formula
    By amit in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2005, 09:06 AM
  5. Help required - Data - Validation - List - Formula
    By amit in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-15-2005, 09:06 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