Hello guys! Really noob VBA and macro user here! I need your help for something I have to do at my work to make it more simple and fast for me. I'll try to explain myself the best I can, sorry if I make this overly complicated, that's not my intention, but I have many variables to consider, so here I go.
I created an example table to illustrate the possible cases:
You are looking at a 5-day worksheet of John Doe, Jane Doe and Sam Doe, three members of our staff.
Long explaining (select below to read):
As you can see, John only worked at day 1, day 3 and day 5. At day 2 and day 4, John missed work without warning. So I MANUALLY paint those days he missed in yellow, as well as the name cell, so I can have a quick reference if he missed ANY day at work. The column G has a COUNTA function that tells me how many days John actually worked (in this case, only 3). The colum H represents a "" value that we give to the staff members that don't miss ANY day at work. That's not John's case, so I leave it blank and I also paint it yellow, manually.
Jane worked all the 5 days, without missing any of them. So no yellow background, all 5 days counted on column G, all smooth and perfect. Jane is going to have the "reward", so I manually place the value "Y" there at column H (that value is always the same for all the members).
Sam worked only 2 days, but he warned us that he was going to miss the other 3 days, so I didn't painted all that cells in yellow (because yellow means exclusively days missed without warning). But also, for him to receive the "reward", he needed to work at least 4 days. That's not the case, so I didn't add the "Y" value to that cell, and also I didn't painted it yellow.
What I need (short version):
I need some formulas for the following cases (rows, columns and cells are based on the picture):
I think that'll be all. If I think of anything else you have to consider for the formulas, I'll let you know. Also please don't hesitate in asking me anything that may help you for finding the solution.
Thanks in advance!!!
I created an example table to illustrate the possible cases:
You are looking at a 5-day worksheet of John Doe, Jane Doe and Sam Doe, three members of our staff.
Long explaining (select below to read):
As you can see, John only worked at day 1, day 3 and day 5. At day 2 and day 4, John missed work without warning. So I MANUALLY paint those days he missed in yellow, as well as the name cell, so I can have a quick reference if he missed ANY day at work. The column G has a COUNTA function that tells me how many days John actually worked (in this case, only 3). The colum H represents a "" value that we give to the staff members that don't miss ANY day at work. That's not John's case, so I leave it blank and I also paint it yellow, manually.
Jane worked all the 5 days, without missing any of them. So no yellow background, all 5 days counted on column G, all smooth and perfect. Jane is going to have the "reward", so I manually place the value "Y" there at column H (that value is always the same for all the members).
Sam worked only 2 days, but he warned us that he was going to miss the other 3 days, so I didn't painted all that cells in yellow (because yellow means exclusively days missed without warning). But also, for him to receive the "reward", he needed to work at least 4 days. That's not the case, so I didn't add the "Y" value to that cell, and also I didn't painted it yellow.
What I need (short version):
I need some formulas for the following cases (rows, columns and cells are based on the picture):
- IF there's at least 1 yellow cell painted between B2 and F2, THEN paint A2 AND H2 in yellow too
- IF the G3 is greater than 12 AND H3/A3 (it's the same) is NOT yellow, then add "200" at H3 (same formula repeats all the way through column H)
I think that'll be all. If I think of anything else you have to consider for the formulas, I'll let you know. Also please don't hesitate in asking me anything that may help you for finding the solution.
Thanks in advance!!!