Forum Discussion
Formula help :)
- Aug 06, 2020
Third question. Solution is bit straightforward, but perhaps works correctly.
So, in Room Allowance sheet we keep matrix like this
That's the only source for employee and room names, in all other places we reference on it.
Next is Helper sheet (could be hided) where we keep combinations of all available periods and rooms and build for each such combination list of employees allowed to book the room.
In C4
=INDEX(Booking!$C$3:$O$3,1,INT((COLUMN()-COLUMN($B$5)-1)/COUNTA(Booking!$B$4:$B$10))+1)drag it to the right till error appears.
In C5
=INDEX(Booking!$B$4:$B$10,MOD((COLUMN()-COLUMN($B$5)-1),COUNTA(Booking!$B$4:$B$10))+1,1)and in C6
=SORT(FILTER( 'Rooms allowance'!$B$3:$B$22, (COUNTIF(INDEX(Booking!$C$4:$O$10,MATCH(C$5,Booking!$B$4:$B$10,0),0),'Rooms allowance'!$B$3:$B$22)=0)* (INDEX('Rooms allowance'!$C$3:$O$22,0,XMATCH(C$4,'Rooms allowance'!$C$2:$O$2))="x") ))Drag them also to the right (or select the range and CTRL+R).
Data validation for entire booking range
is with formula
=INDEX(Helper!$C$6:$CO$6,1,XMATCH(C$3&$B4,Helper!$C$4:$CO$4&Helper!$C$5:$CO$5))#Solution is very depends on number of employees, I assumed relatively small one.
Another variant which I tried, without helper, doesn't work since data validation has 256 characters limit on formula length and now I don't see the way how to fit it.
Hi againSergeiBaklan
I tried to adjust it, but unfortunately it doesn't seem to work, so the formulas might be fixed - I just don't get it.
Please, if you have the time, could I ask you to take a look at my Excel document, where I tried to copy paste your formula, however it does not work properly.
Hi Maria,
In updated file which exactly table shall be filled and what is the data source. In addition you have Visning uge 33 and Overview sheets, is that something from them shall be used?
- SergeiBaklanAug 31, 2020Diamond Contributor
mariasolhoej , you are welcome. Hope it works this time.
- mariasolhoejAug 30, 2020Copper Contributor
- SergeiBaklanAug 30, 2020Diamond Contributor
You are right, forgot about this. I expanded Helper on all days, no booking is checked independently for each day.
- mariasolhoejAug 30, 2020Copper Contributor
Hi SergeiBaklan
Thank you very much for your reply. 🙂
It looks like I can book the employee more times than one at the same time slot.
See Tuesday "TUDA". I would really like that if I choose TUDA for 6x, it should not be possible also to choose TUDA for 6y and 8z at the same time that day. You see?Best regards,
Maria
- SergeiBaklanAug 29, 2020Diamond Contributor
Hi Maria,
Sorry for the delay, was quite busy these days.
Formulas: I changed Helper layout, now it looks as
I assume we exactly the same names and rooms for each day of the week as defined in Classes, and same time frames for each day. For possible modifications if Classes will be different for days of the week, as well as times, such layout will be more suitable.
Ranges with room, times and booking are named, you may check exact names in Name Manager.
Formulas for data validation drop-down are at the right in Week 38, they could be removed. Perhaps some other changes I forgot to mention, please check the file.
- mariasolhoejAug 27, 2020Copper Contributor
Hi again SergeiBaklan
Please forget about "Visning uge 33" and "Overview". 🙂
I would like to fill the table in the sheet called "Week 38" and the data source is "Classes"
Best regards,
Maria