Hi friends,
Iam new to macros and VBA. I have to develop an seating plan with the following rules. In a bench if a 3rd standard child sits then next to that child only a 4th standard child has to sit and behind a 3rd standard child ,a 3rd child or a 5th standard child can sit. Behind a 4th standard child a 4th or 6th standard child can sit. After filling the seats for 3rd and 4th only I take up 5th and 6th. Same rule applies. In a bench if a 5th standard child sits then next to him a 6th child sits and behind a 5th standard child ,a 5th child or a 7th standard child can sit. Behind a 6th standard child a 6th or 8th standard child can sit. and goes on. When I feed less data the logic works fine. If i feed more 3rd standard students and less 4th or vice versa then the code doesn't work properly. I have attached the sample data , expected output and current output. Request the support and help to fix this issue.
Bookmarks