Nov 10 2021 03:35 PM
Hi all
Hope you can help?
This one is probably simple but is bamboozling me.....
I have four names:
Jane
Bob
John
Martin
I need a non VBA method to display based on the week number who's turn it is to wash up...
For example, I would set who starts first. Ie. WK46 - Jane
Then, I would like a formula to based on the week number select whos turn it is...
E.g. in cell A1 = 46
cell A2 formula would equal =Jane
E.g. in cell A1 = 48
cell A2 would say = John
Can this be achieved without planning out the 52 weeks of the year in a vlookup table? I am ideally looking for some formula that works out depending on the week number and pattern whos turn would be next....
Any help appreciated!
Many thanks
Matt
Nov 10 2021 04:13 PM
Nov 10 2021 09:24 PM
@matt0020190 Or perhaps enter in A1:
=WEEKNUM(TODAY())
to get the current week number. And in A2, @mtarler 's formula, slightly modified:
=CHOOSE(MOD(A1,4)+1,"John","Martin","Jane","Bob")
Nov 11 2021 02:40 PM
Nov 11 2021 02:41 PM
Nov 11 2021 04:54 PM
Nov 11 2021 05:34 PM
@matt0020190 i don't know that I fully understand what you want to have fixed/set and such. here is my best guess. you have a list of names (col E in my example) and that list of names must be rotated throughout the year such that Name X must land on week Y (I called Set Wk in cell F2). Note that in my example I only set 1 wk and the list must be in order accordingly. You could have a week set for each name and then use a lookup but then you must make sure each name has a unique index based on the MOD(week num, count of names). Here is the formula and a picture of how it is set up and col B is calculated automatically (note i used an Array so if you don't have Excel 365 then remove the array $A$2:$A$53 and use $A2 and then copy/fill down.
=INDEX(OFFSET($E:$E,1,0,COUNTA($E:$E)-1),MOD($A$2:$A$53-$G$2,COUNTA($E:$E)-1)+1)
Nov 12 2021 01:00 AM - edited Nov 12 2021 01:03 AM
@mtarler thanks so much for your help and your time. Excellent!
It is pretty much what I am after except creating the list.
I was hoping to feed the formula from a specific week number to output the name. E.g.
Cell A1 =WEEKNUM(TODAY(),21)
Cell A2 = formula to display the name for the relevant week number in cell A1
Of course the above would follow the logic set out in your example where I can define a specific week number for the starting name.
I tried a vlookup but it ruins the list you created in A/B columns. What am I missing, I guess its what you mentioned about an unique index?
Nov 12 2021 05:38 AM
Solution@matt0020190 i updated my sample sheet to have a ThisWk cell and a YouPick cell and the corresponding names. i used the exact same formula as B2 but instead of the array $A$2:$A$53 I just point to the WkNumber of interest. Note: that formula is 'overly complicated' in that it doesn't assume how many people are in that list.
Nov 12 2021 05:38 AM
Solution@matt0020190 i updated my sample sheet to have a ThisWk cell and a YouPick cell and the corresponding names. i used the exact same formula as B2 but instead of the array $A$2:$A$53 I just point to the WkNumber of interest. Note: that formula is 'overly complicated' in that it doesn't assume how many people are in that list.