+ Reply to Thread
Results 1 to 18 of 18

Data Validation Of Names Required from given List :confused

  1. #1
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Data Validation Of Names Required from given List :confused

    Greetings to all

    I am running into big problem

    I have two sheets called “Timetable” & “Teachers Name List”

    What I want is a “VB/Macro Code” which can check and validates names into my “Timetable” sheet from “Teachers Name List” sheet

    So that if any one enter wrong spelling of any teachers in “Timetable” sheet, it Prevent from entering it and give error message “Spelling mismatch from Teachers Name List sheet”

    Excel file & Image are attached

    Time table high school.xls

    Teachers name Validation Sample.jpg

    Please make the code flexible so that I may able to Add and Delete name from the “Teachers Name List” anytime in future

    And good Help from any one will be highly appreciated

    Many thanks
    Last edited by pipsmultan; 07-21-2014 at 07:00 PM.

  2. #2
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    any one out there who can help me on the above issue.. please

    many thanks in advance

  3. #3
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    Anyone "kind" assistance would be very much appreciated....

  4. #4
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    Bump no response

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    Ok, here is a solution to your problem.
    Look at the attached workbook. You'll see that I did modify your Teachers Name List by adding a column named Teachers number. This is what the users must enter in your Timetable cells when creating the schedule. Each time a cell is edited, the following macro will search the cell for the word "Teacher" and it will replace it with the teacher name. You can have as many teachers as you want in a cell. You just HAVE TO separate them with a SPACE.
    All you have to do is make sure there is a space before and after the teacher's number.

    Here is the macro:
    Please Login or Register  to view this content.
    The workbook is ready to run.
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  6. #6
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    The Ideal you use is very good

    1. But problem is I’m not the only one who entering the data in timetable sheet, as it is hard to remember all the "Teachers number" of a particular teachers rather than their names. It will not look user friendly to others.

    2. I have uploaded the some error screen images which appears on wrong entry which halt the excel file to stop responding and it will not work unless and until I close excel file and reopen it.

    01.jpg

    02.jpg


    I was using the following formula for name Validation in “Data tab”. But it is only possible if I can afford not to have merged cell and can enter names in cells.

    Please Login or Register  to view this content.
    This will capture teacher's names in A7 to A100. If I have more teachers in future, and In the Error Alter tab, I put appropriate alert.

    but it is not working for me I want to know is it possible to convert above function in "VB/Macro"

    Or any other alternate will be highly appreciated

    Many Thanks

  7. #7
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    The error you got is part of the macro I programmed for you. You click OK and it will resume normal operations.
    What you must enter in you Timetable cell is something like this:
    Physics Teacher12 10th west
    And the macro changes this to:
    Physics Mis Ema 10th west

    I thought it would be possible to print the teachers list so people entering a schedule could easily find the teachers number and may be get used to it and know it all by heart.
    Sorry if this is not a possible solution to your problem.

  8. #8
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    Quote Originally Posted by p24leclerc View Post
    Sorry if this is not a possible solution to your problem.

    No not at all.
    I respect your thought and your Hard Work u have put in, I will always be grateful for all that you have done to help me.
    i still working on it to find the best possible alternate solution which can check and validates names into my “Timetable” sheet from “Teachers Name List” sheet.

    and if You Or Anyone find any alternate plz share

    I am so thankful for the time you took to help with my project.

    Regards
    Last edited by pipsmultan; 07-23-2014 at 02:46 AM.

  9. #9
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    here is another possible solution, probably more acceptable.

    First, I created a named range in Teachers Name List that will expand as you add new teachers below the actual list. I would recomment not to change tis location unless you know about named range and you make sure it's still connected to the proper range of data.

    You'll see that I created a button on the top left of the screen named "New course" I did not know what exact terminology you wanted to use so you can change those as you want. I also froze the scroll of the screen so this button is always visible.

    Now here is how it works:
    1. you click on any cell where you want to create a new course. You set it as you wish regarding the merged cells prior to click on the button.
    2. you click on the button which will open a userform divided in 3 sections (I think that is what you needed by looking at actual schedule)
    First part is the matter of the course. You write directly in the texbox (like Math or Bio or Physics)
    Second part is the teachers' selection. it is a listbox that allow multiple selection. You hold the CTRL key and click on as many teachers as you like.
    Thrid part is the location of the course (my understanging of it, though). You write directly into the textbox.
    3. when you are done, you click on the left button at the bottom to transfer all the information into the selected cell. The macro will add a line feed between each section.

    And that's about it. The other button at the bottom is self explanatory.

    Hope this will help you and your co-workers
    Attached Files Attached Files

  10. #10
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    see my previous post just above.

  11. #11
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    Quote Originally Posted by p24leclerc View Post
    see my previous post just above.
    Hi,

    i m glad to see You

    plz wait let me check your previous post

  12. #12
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    This is superb! You are so creative—I always love getting your perspective on Projects, this is more than I expected.
    I had no idea a Timetable could look this good.

    You set a high bar with this one I really appreciate your help, Thanks a million for finding outstanding solution of problems

    1. Just need little bit update in New Course "Dialogue Box" & "Teachers Name List" please see sample image below

    Attachment 334542

    Attachment 334543

    2. I dont know why i am getting error in "Teachers Workload" Sheet, plz see the error image

    Attachment 334544

    3. last why i cant do "Undo/Redo" or Ctrl+Z / Ctrl+Y in Sheet, is there any solution of it.

    Many Many Thanks for all your Superb Effort

    Regards

  13. #13
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    Hi, everything is running well on my computer. I can't see what the problem could be.

    About your attachements, I just cannot open them; none of them.

    There is no way to undo what a macro does. That's why the undo is grey.

  14. #14
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    Hi,

    i have attach the excel file and put the sample images inside.

    Time table high school-2.xls

    hope this will open

    Regards

  15. #15
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    The 2 macros are working as intended. I got no error. Were they working for you too in the actual workbook?

    I can see your pictures but I don't understand how it relates to what there is in the workbook.
    You seems to have made some changes to the sheets ( as per pictures) but I see nothing changed in the workbook itself.
    I don't understand your HIGHER, MIDDLE and JUNIOR teacher's list either.
    Can you attached a modified workbook and tell me how it is supposed to be working?
    I feel like I'm working on something that is not really what you need.
    I'm lost. Not sure where you are going from here.

  16. #16
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    For your Clear understanding i have Highlighted Some Cell in "Timetable" Sheet which is showing HIGHER, MIDDLE and JUNIOR Section or your can say Classes
    for example
    Green Color is Showing "Higher Section"
    Yellow Color is Showing "Middle Section"
    Blue Color is Showing Junior Section

    now actually what i trying to say is i hav made some changes in the "New Course" Button. When you click on the "New Course" button a "Dialogue box" in which it showing HIGHER, MIDDLE and JUNIOR Section Teachers name List

    "New Course" Button which will open a userform which was divided in 3 sections, But now it is diived in 5 Section.

    Second part is the teachers' selection. it is a 1 listbox that allow multiple selection, Now i have added 2 more listbox with their name (You can see their captions).

    U have created a named range in Teachers Name List that will expand as I add new teachers below the actual list. Now i have added 2 More "Columns" and i renamed it (HIGHER, MIDDLE and JUNIOR Section Teachers List) as you can see in "Teachers Name List" Sheet

    Reason of doing this to Categorized teachers according to there respective department/Sections, So that respective Department teacher can be easily Selected & Searchable by anyone

    last all 3 listbox should be interconnected with each other have that allow multiple selection "like if any one want ONE/Two teacher from Middle Section and One/Two Teacher From "Junior Section" they all can be adjusted in one Cell and soo on


    Time table high school-2.xls
    hope u Understand Now

    Best Regards

  17. #17
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation Of Names Required from given List :confused

    Look at the attached workbook.
    I created conditional formatting in sheets Teachers Name List and Teachers Workload so that new entry will automatically have borders around it.

    I created new named range for Middle and Junior teacher's section.

    Timetable macro "New course" waa modified to be able to select as many teachers as you want from any teacher's section.

    Try it, I hope it will be work as you expected.

    There is a macro in the Teachers Workload section of VBE (Visual Basix Editor) that is erasing all cells of the workload sheet if any cell is modified. I did this so that no one can change this table so that it does not represent the Timetable content anymore. If you don't like this, just erase this macro from that sheet. Here is the macro:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Data Validation Of Names Required from given List :confused

    SUPERBLY DONE

    Thank you so much for all of that awesome

    Your service has been of incomparable value and I wanted to let you know that thousands of miles away from you, I’ll forever be grateful, I appreciate your critical thinking around this project.

    Thank you from the bottom of my heart for your commitment. You are not only a valued member of this FORUM, you’re a dear friend.

    last "Thanks a million for your kind Help

    Best Regards

+ 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. Re-Post: Case Sensitivity Required In Data Validation List
    By gaikwad.mm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2014, 05:41 AM
  2. List Sheet Names in Data Validation List without VBA
    By Al Chara in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2013, 01:49 AM
  3. Replies: 11
    Last Post: 10-06-2011, 02:26 PM
  4. Replies: 1
    Last Post: 10-05-2011, 04:57 PM
  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