Excel formula needed

FLdave12

Board Regular
Joined
Feb 4, 2022
Messages
73
Platform
  1. Windows
I have excel workbook with 4 sheets in it. It is a bid system workbook where employees bid by seniority for shift, days off and vacation time. The Master Sheet has members broken down by Shift Supervisors, Team Leads and Specialists. I have drop down menus with employee names, Choice of shifts (1st, 2nd, 3rd), and days off (SM, MT,TW, WT, TF, FR, and SS)

I have the other 3 sheets in the workbook labeled 1st, 2nd and 3rd. Each sheet has 6 months with rows for each month, day and date. I want members name and days off to auto fill based on the shift they selected. Also if possible approved vacation dates.
EX.
Month June 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1st Shift S S M T W T F S S M T W T F
Employee 1 X X V V V

I am requesting assistance with formula or formulas to make this work. Appreciate any advice or assistance.



I would like an X to fill in for each employee days off. Ex. An X under day S & S for each of the 6 months.
 
Ken,

Forgot to mention is there a way to set the start date of the first month and end date of the last month by specific dates? If not that is fine. Our bid period is every 6 months. The start date is usually mid month, for example July 14 and end date of Jan 11.

Thanks again for all you help.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Okay...so you still need two cells for vacation date "choices"? But each of those cells might contain multiple, non-consecutive dates? I'll try to give this a look over the next day or two. I'll also have a look at the link to see why the single dates weren't working...I didn't have any issues with them before.

P.S. It's Kirk, not Ken.
 
Upvote 0
Sorry for the wrong name, Kirk.

Also, did you see my other question concerning start date of beginning month and ending date of last month? As I said, if not possible that is find. Is there a way to manually hide say
July 1 to 13 first month and last month stopping at say Jan 13. Just side note these values would not permanent for each bid period.

Really appreciate your help.
 
Upvote 0
Sorry...I missed the other question. So to clarify, you'd like to specify a start and end date for the output calendars and then have results for those multiple months spill out into separate monthly calendars? And ideally, you would like to have results cleared for any dates in the start and end months that are not within the date range? I implemented a somewhat clunky way to accomplish some of this in the "1st" worksheet, where the calendar-generating formula is manually pasted below the calendar block above, but it doesn't clear results, and it doesn't automatically spill all relevant months. I'll look into it. The formula considers each month to be a spilled array consisting of multiple rows and columns. So nearly the entire formula would need to be looped through for each month and the final results for each loop (month) would then be aggregated to deliver all of the monthly results in one long spilled array. That may be doable with LAMBDA functions, and certainly with VBA.
 
Upvote 0
Kirk,

Yes, Just as you previously mentioned. I need two cells for vacation date "choices. But each of those cells might contain multiple, non-consecutive dates and block of time off as it is now, ie, 6/18/24-6/25/24. Also, I would like to specify a start and end date for the output calendars and then have results for those multiple months spill out into separate monthly calendars? And ideally, would like to have results cleared for any dates in the start and end months that are not within the date range.

Thanks for your help
 
Upvote 0
Here is a modified version that adds the features you've described. In this version, you can enter a list of single dates or date ranges in either of the two vacation request blocks using commas to separate list items and hyphens to indicate a date range. Dates must be expressed in m/d/yy or mm/dd/yyyy formats.

Because there is interest in specifying a term (I believe you called it a bid period) for the beginning and end dates, those inputs are now done on the Master worksheet (cells J2 and J3 in this example). These inputs are used in the formulas and assigned to variables "cbeg" (calendar begins) and "cend" (calendar ends). And because you want to populate each of the Shift worksheets (1st, 2nd, and 3rd) with monthly calendars included in the bid period, I think it is appropriate to define a formula that works for a single month, and then repeatedly call that formula to deliver results for the other months. To do this, the original formula was taken as a baseline and then modified to adapt it for this purpose. This involved taking an entirely different approach for teasing out all of the vacation dates found within the members' input lists.

Briefly, the steps taken for building the vacation dates lists involved:
  1. Merging the two user input cells (for 1st and 2nd vacation requests), and then separating those entries with a comma (see "vall").
  2. Going row-by-row down the list of members and splitting apart "vall" to create an array that spills to the right, and each array element is either a blank, a single date, or a date range (see "vallsplit").
  3. Examining each array element in "vallsplit" to determine if a hyphen is present. If so, the original array element is replaced with a sequence of dates covering the beginning and ending dates; and if not, the original entry is retained...and then joining together all dates within this array with comma delimiters (see "vd").
  4. Taking the "vd" array row-by-row (which means all vacation dates associated for a given member), and combining those individual lists of dates into a single comprehensive list array with comma delimiters (see "vdcomb"...short for vacation dates combined).
Then we can apply logical tests to each date in the month ("da") to determine if it falls within the range described by "cbeg" and "cend" (if not, a blank), and if so, then does the date correspond to a regular day off (if so, an "X"), otherwise, does the date correspond to one found in that member's vacation date list (appropriate row of "vdcomb"), and if so, then return a "V", otherwise a blank is returned. These assignments are made in the "vdo" instruction.

These are the more significant changes in the formula that generates the monthly output. Most of the original formula and explanation (other than the revised portion described above) still applies. At this point, it makes sense to recast this base formula as a stand-alone function so that it can be called repeatedly by another formula that controls the number of times it should be called and then vertically stacks each of the resulting monthly calendars so that all months between "cbeg" and "cend" are displayed. The base function to generate a monthly calendar is named MonthCal and it requires six arguments that must be passed to it:
  • cbeg - mentioned above...the beginning date for the term (bid period)
  • cend - mentioned above...the end date for the term (bid period)
  • pcat - the position categories (the array found at Lists!C2#)
  • dol - the shorthand abbreviation list of days off (effectively, customized weekends)...(the array found at Lists!D2#)
  • currshtcell - a cell found on the current worksheet ($A$1 used, a formality for getting the name of the worksheet)
  • n - the index number of the month whose calendar should be displayed, a 0-basis index, so the "cbeg" month is 0
The easiest way to make this name assignment is to use Excel's Advanced Formula Environment (Excel Labs), where you can assign the name MonthCal, enter a description for the function (monthly schedule of vacation and days off), define the list of parameters that need to be passed to it (cbed, cend, pcat, dol, currshtcell, n), and then paste in the formula, beginning with =LET.
Excel Formula:
=LET(
    mobase, EOMONTH(cbeg, -1) + 1,
    mo, EDATE(mobase, n),
    da, SEQUENCE(1, DAY(EOMONTH(mo, 0)), mo),
    dow, CHOOSE(WEEKDAY(da), "S", "M", "T", "W", "T", "F", "S"),
    sht, TEXTAFTER(CELL("filename", currshtcell), "]"),
    rone, HSTACK(TEXT(mo, "mmm-yy"), "Members", TEXT(da, "d")),
    blnk, MAKEARRAY(1, COLUMNS(rone), LAMBDA(r, c, "")),
    end, HSTACK("end", DROP(blnk, , 1)),
    rtwo, HSTACK(sht & " Shift", "", dow),
    rthreea, HSTACK("Supervisor/Team Lead/Specialist Positions", DROP(blnk, , 1)),
    rthreeb, HSTACK("All Positions", DROP(blnk, , 1)),
    rlow, HSTACK("Classification Administrative Positions", "Members", DROP(blnk, , 2)),
    ary, FILTER(tblMaster, tblMaster[Shift] = sht, ""),
    pm, CHOOSECOLS(ary, 1, 2),
    doi, MATCH(CHOOSECOLS(ary, 4), dol, 0),
    vall, CHOOSECOLS(ary, 5) & "," & CHOOSECOLS(ary, 6),
    vallsplit, IFERROR(TRIM(DROP(REDUCE(0, vall, LAMBDA(a, b, VSTACK(a, TEXTSPLIT(b, ",")))), 1, 0)),""),
    vd, MAP(vallsplit,LAMBDA(d,LET(begin, TEXTBEFORE(d, "-", , , , d) + 0, end, TEXTAFTER(d, "-", , , , d) + 0, reqd, IFERROR(SEQUENCE(end - begin + 1, , begin), ""), TEXTJOIN(",", 1, reqd)))),
    vdcomb, BYROW(vd, LAMBDA(r, TEXTJOIN(",", 1, r))),
    vdo, IF( (da < cbeg) + (da > cend) > 0, "", IF( (MOD(doi - 1, 7) + 1 = WEEKDAY(da)) + (MOD(doi, 7) + 1 = WEEKDAY(da)) > 0, "X", IF(ISNUMBER(FIND(da & "", vdcomb)), "V", ""))),
    res, HSTACK(pm, vdo),
    ressrt, SORTBY(res, MATCH(TAKE(res, , 1), pcat, 0), 1, CHOOSECOLS(res, 2), 1),
    pos, TAKE(ressrt, , 1),
    restop, IF( sht = "1st", FILTER(ressrt,((pos = INDEX(pcat, 1)) + (pos = INDEX(pcat, 2)) + (pos = INDEX(pcat, 3))) > 0), ressrt),
    resbot, FILTER(ressrt, ((pos = INDEX(pcat, 4)) + (pos = INDEX(pcat, 5))) > 0),
    t_r1, HSTACK("Total Supervisors/Team Leads","",BYCOL(DROP(restop, , 2),LAMBDA(c,LET(p, CHOOSECOLS(restop, 1),SUM(((p = INDEX(pcat, 1)) + (p = INDEX(pcat, 2)) > 0) * (c = "")))))),
    t_r2, HSTACK("Total Classification Specialists","",BYCOL(DROP(restop, , 2),LAMBDA(c, LET(p, CHOOSECOLS(restop, 1), SUM((p = INDEX(pcat, 3)) * (c = "")))))),
    t_r3, HSTACK("Total on Shift","",BYCOL(DROP(restop, , 2), LAMBDA(c, LET(p, CHOOSECOLS(restop, 1), SUM(--(c = "")))))),
    b_r1, HSTACK("Total Job Assignment Specialists","",BYCOL(DROP(resbot, , 2),LAMBDA(c, LET(p, CHOOSECOLS(resbot, 1), SUM((p = INDEX(pcat, 4)) * (c = "")))))),
    b_r2, HSTACK("Total Reclassification Specialists","",BYCOL(DROP(resbot, , 2),LAMBDA(c, LET(p, CHOOSECOLS(resbot, 1), SUM((p = INDEX(pcat, 5)) * (c = "")))))),
    b_r3, HSTACK("Total on Shift","",BYCOL(DROP(resbot, , 2), LAMBDA(c, LET(p, CHOOSECOLS(resbot, 1), SUM(--(c = "")))))),
    fintbl, IF(sht = "1st",VSTACK(rone, rtwo, rthreea, restop, blnk, t_r1, t_r2, t_r3, blnk, rlow, resbot, blnk, b_r1, b_r2, b_r3, end, blnk), VSTACK(rone, rtwo, rthreeb, restop, blnk, t_r1, t_r2, t_r3, end, blnk)
    ),
    fintbl)

In practice, I'm envisioning that after some preliminary adjustments, the first five of the arguments will typically remain unchanged, and only "n" will change to display each month sequentially.

Then on each of the Shift worksheets, the following formula generates an array of month indexes, "midx". For example, when "cbeg" is 2/5/24 and "cend" is 7/15/24, then "midx" is {0;1;2;3;4;5}. Finally, this "midx" array is passed to the REDUCE LAMBDA helper function, which in turn calls the MonthCal function for each of the values in "midx" and vertically stacks the monthly outputs:

Excel Formula:
=LET(cbeg,Master!$J$2, cend,Master!$J$3, nmo,12*(YEAR(cend)-YEAR(cbeg))+MONTH(cend)-MONTH(cbeg)+1, midx,SEQUENCE(nmo,,0),
IFERROR(DROP(REDUCE("",midx,LAMBDA(a,b,VSTACK(a,MonthCal(cbeg, cend, Lists!$C$2#, Lists!$D$2#, $A$1, b)))),1,0),""))
The Lists worksheet:
MrExcel_FLdave12_20240624.xlsx
ABCD
1Shifts for Non-SupervisorsShifts for SupervisorsPositionDays Off
21st1stShift SupervisorSM
32nd2ndTeam LeadMT
43rd3rdClassification SpecialistTW
5FloatingJob Assignment SpecialistWT
6Reclassification SpecialistTF
7FS
8SS
Lists
Cell Formulas
RangeFormula
A2:A4A2=LET(a,SEQUENCE(3),a&CHOOSE(a,"st","nd","rd"))
B2:B5B2=VSTACK(A$2#,"Floating")
C2:C6C2={"Shift Supervisor";"Team Lead";"Classification Specialist";"Job Assignment Specialist";"Reclassification Specialist"}
D2:D8D2={"SM";"MT";"TW";"WT";"TF";"FS";"SS"}
Dynamic array formulas.

The Master worksheet:
MrExcel_FLdave12_20240624.xlsx
ABCDEFGHIJ
1PositionMemberShiftDays Off1st Approved Vacation2nd Approved Vacation
2Shift Supervisorfoxtrot1stMT1/7/2024-1/16/20244/2/2024-4/15/2024Term Begins2/5/2024
3Shift Supervisordelta2ndTF3/2/2024, 3/11/2024, 4/3/24-4/6/246/26/24-7/7/24Term Ends7/15/2024
4Shift SupervisorlimaFloatingWT
5Shift Supervisormike3rdWT3/11/2024-3/16/20242/11/2024
6Team Leadcharlie2ndFS4/3/2024-4/6/20245/5/2024-5/10/2024
7Team Leadjuliet1stSS3/20/20244/7/2024
8Team Lead
9Job Assignment Specialistalpha2ndSS3/2/2024-3/11/2024
10Job Assignment Specialistkilo1stMT4/7/24-4/11/24
11Job Assignment Specialistbravo3rdTW4/15/2024-4/21/20245/14/2024-5/24/2024
12Reclassification Specialistindia2ndTF
13Reclassification Specialistecho1stTF3/3/2024-3/6/20243/27/2024-3/30/2024
14Reclassification Specialist
15Classification Specialistgolf2ndTW2/18/2024
16Classification Specialisthotel1stFS
17Classification Specialistoscar3rdMT
18Classification Specialistnovember2ndWT6/15/24-6/19/24
Master
Cells with Data Validation
CellAllowCriteria
C2:C18List=ddShiftList
D2:D18List=Lists!$D$2#
A2:A18List=Lists!$C$2#

A portion of the 1st (shift) worksheet (other months spill further below, but not included due to space limitations). This same formula would be copied to the 2nd and 3rd worksheets to display monthly calendars for those shifts:
MrExcel_FLdave12_20240624.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1Monthly Staffing (Shift: 1st, Period: 2/5/24–7/15/24)
2
3Feb-24Members1234567891011121314151617181920212223242526272829
41st ShiftTFSSMTWTFSSMTWTFSSMTWTFSSMTWT
5Supervisor/Team Lead/Specialist Positions
6Shift SupervisorfoxtrotXXXXXXXX
7Team LeadjulietXXXXXX
8Classification SpecialisthotelXXXXXX
9
10Total Supervisors/Team Leads22221122211112221111222111122
11Total Classification Specialists11111111001111100111110011111
12Total on Shift33332233212223321222332122233
13
14Classification Administrative PositionsMembers
15Job Assignment SpecialistkiloXXXXXXXX
16Reclassification SpecialistechoXXXXXXX
17
18Total Job Assignment Specialists11110011111001111100111110011
19Total Reclassification Specialists11111110011111001111100111110
20Total on Shift22221121122112112211211221121
21end
22
23Mar-24Members12345678910111213141516171819202122232425262728293031
241st ShiftFSSMTWTFSSMTWTFSSMTWTFSSMTWTFSS
25Supervisor/Team Lead/Specialist Positions
26Shift SupervisorfoxtrotXXXXXXXX
27Team LeadjulietXXXXXXVXXXX
28Classification SpecialisthotelXXXXXXXXXX
29
30Total Supervisors/Team Leads2111122211112221111122111122211
31Total Classification Specialists0011111001111100111110011111001
32Total on Shift2122233212223321222232122233212
33
34Classification Administrative PositionsMembers
35Job Assignment SpecialistkiloXXXXXXXX
36Reclassification SpecialistechoXVVVVXXXXXXVXXV
37
38Total Job Assignment Specialists1110011111001111100111110011111
39Total Reclassification Specialists0100000011111001111100111100001
40Total on Shift1210011122112112211211221111112
41end
42
1st
Cell Formulas
RangeFormula
A1A1=CONCAT("Monthly Staffing (Shift: ",TEXTAFTER(CELL("filename",$A$1),"]"),", ", "Period: ",TEXT(Master!J2,"m/d/yy"),"–",TEXT(Master!J3,"m/d/yy"),")")
A3:AG122A3=LET(cbeg,Master!$J$2, cend,Master!$J$3, nmo,12*(YEAR(cend)-YEAR(cbeg))+MONTH(cend)-MONTH(cbeg)+1, midx,SEQUENCE(nmo,,0), IFERROR(DROP(REDUCE("",midx,LAMBDA(a,b,VSTACK(a,MonthCal(cbeg, cend, Lists!$C$2#, Lists!$D$2#, $A$1, b)))),1,0),""))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A3Expression=$B3="Members"textNO
A3Expression=OR($A3="1st Shift",$A3="2nd Shift",$A3="3rd Shift",$A3="Supervisor/Team Lead/Specialist Positions")textNO
A3Expression=OR($A3="Total Supervisors/Team Leads",$A3="Total Classification Specialists",$A3="Total on Shift",$A3="Total Job Assignment Specialists",$A3="Total Reclassification Specialists")textNO
A3Expression=$A3="end"textNO
A4:AG154,B3:AG3,A2:AG2Expression=$B2="Members"textNO
A4:AG154,B3:AG3,A2:AG2Expression=OR($A2="1st Shift",$A2="2nd Shift",$A2="3rd Shift",$A2="Supervisor/Team Lead/Specialist Positions")textNO
A4:AG154,B3:AG3,A2:AG2Expression=OR($A2="Total Supervisors/Team Leads",$A2="Total Classification Specialists",$A2="Total on Shift",$A2="Total Job Assignment Specialists",$A2="Total Reclassification Specialists")textNO
A4:AG154,B3:AG3,A2:AG2Expression=$A2="end"textNO

A full working version is available at:
 
Upvote 0
In the previous post I mentioned how the MonthCal LAMBDA function could be set up using Excel's Advanced Formula Environment. Alternatively, it could be established using the more traditional Name Manager. These two approaches differ in what should be entered for the function. For long formulas, I tend to rely on the AFE rather than the Name Manager. For reasons that I do not fully understand, the formula entered in the AFE is not quite the same as that entered into the Name Manager. The AFE version requires the LET formula, but AFE "understands" that the formula is a LAMBDA function, so the function "LAMBDA" (the word itself) and its argument list are not entered in the Function Definition field...only the main LET part of the formula is entered in the Function Definition, and the argument list is entered separately into the Arguments field, separated by commas. The Name Manager, on the other hand, requires that the entire function (=LAMBDA(argument list, LET...) must be entered into the Refers to: field. For some reason, the Name Manager does not appear to display the formula correctly in the editable Refers to:, while the summary display (not editable) of named variables does appear to display the formula correctly in its "Refers to" column.

Here is an example of the MonthCal function being used as a stand-alone LAMBDA to return the results for the third month in the bid period specified (note the "2" in the argument list passed to the function in the parentheses following the function, and recall that the month index is a 0-basis index). In this example, a date in February 2024 was the beginning of the bid period, so n=2 means April 2024. I've replaced the posted working file with an updated version that includes this stand-alone LAMBDA on the 3rd shift tab and edited some 3rd shift entries on the Master sheet to illustrate functionality.
MrExcel_FLdave12_20240624.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
81MonthCal LAMBDA function
82monthly schedule of vacation and days off
83arguments: cbeg,cend,pcat,dol,currshtcell,n
84
85Apr-24Members123456789101112131415161718192021222324252627282930
863rd ShiftMTWTFSSMTWTFSSMTWTFSSMTWTFSSMT
87All Positions
88Shift SupervisormikeXXXXXXXX
89Classification SpecialistoscarXXVVVVVXXVXXVVXXXX
90Job Assignment SpecialistbravoXXXXVXXVVVVXXX
91
92Total Supervisors/Team Leads110011111001111100111110011111
93Total Classification Specialists000000000111010000111001111100
94Total on Shift210122221123231100222211233321
95end
96
3rd
Cell Formulas
RangeFormula
A85:AF96A85=LAMBDA(cbeg,cend,pcat,dol,currshtcell,n,LET( mobase, EOMONTH(cbeg, -1) + 1, mo, EDATE(mobase, n), da, SEQUENCE(1, DAY(EOMONTH(mo, 0)), mo), dow, CHOOSE(WEEKDAY(da), "S", "M", "T", "W", "T", "F", "S"), sht, TEXTAFTER(CELL("filename", currshtcell), "]"), rone, HSTACK(TEXT(mo, "mmm-yy"), "Members", TEXT(da, "d")), blnk, MAKEARRAY(1, COLUMNS(rone), LAMBDA(r,c, "")), end, HSTACK("end", DROP(blnk, , 1)), rtwo, HSTACK(sht & " Shift", "", dow), rthreea, HSTACK("Supervisor/Team Lead/Specialist Positions", DROP(blnk, , 1)), rthreeb, HSTACK("All Positions", DROP(blnk, , 1)), rlow, HSTACK("Classification Administrative Positions", "Members", DROP(blnk, , 2)), ary, FILTER(tblMaster, tblMaster[Shift] = sht, ""), pm, CHOOSECOLS(ary, 1, 2), doi, MATCH(CHOOSECOLS(ary, 4), dol, 0), vall, CHOOSECOLS(ary, 5) & "," & CHOOSECOLS(ary, 6), vallsplit, IFERROR( TRIM(DROP(REDUCE(0, vall, LAMBDA(a,b, VSTACK(a, TEXTSPLIT(b, ",")))), 1, 0)), "" ), vd, MAP( vallsplit, LAMBDA(d, LET( begin, TEXTBEFORE(d, "-", , , , d) + 0, end, TEXTAFTER(d, "-", , , , d) + 0, reqd, IFERROR(SEQUENCE(end - begin + 1, , begin), ""), TEXTJOIN(",", 1, reqd) ) ) ), vdcomb, BYROW(vd, LAMBDA(r, TEXTJOIN(",", 1, r))), vdo, IF( (da < cbeg) + (da > cend) > 0, "", IF( (MOD(doi - 1, 7) + 1 = WEEKDAY(da)) + (MOD(doi, 7) + 1 = WEEKDAY(da)) > 0, "X", IF(ISNUMBER(FIND(da & "", vdcomb)), "V", "") ) ), res, HSTACK(pm, vdo), ressrt, SORTBY(res, MATCH(TAKE(res, , 1), pcat, 0), 1, CHOOSECOLS(res, 2), 1), pos, TAKE(ressrt, , 1), restop, IF( sht = "1st", FILTER(ressrt, ((pos = INDEX(pcat, 1)) + (pos = INDEX(pcat, 2)) + (pos = INDEX(pcat, 3))) > 0), ressrt ), resbot, FILTER(ressrt, ((pos = INDEX(pcat, 4)) + (pos = INDEX(pcat, 5))) > 0), t_r1, HSTACK( "Total Supervisors/Team Leads", "", BYCOL(DROP(restop, , 2), LAMBDA(c, LET(p, CHOOSECOLS(restop, 1), SUM(((p = INDEX(pcat, 1)) + (p = INDEX(pcat, 2)) > 0) * (c = "")))) ) ), t_r2, HSTACK( "Total Classification Specialists", "", BYCOL(DROP(restop, , 2), LAMBDA(c, LET(p, CHOOSECOLS(restop, 1), SUM((p = INDEX(pcat, 3)) * (c = ""))))) ), t_r3, HSTACK( "Total on Shift", "", BYCOL(DROP(restop, , 2), LAMBDA(c, LET(p, CHOOSECOLS(restop, 1), SUM(--(c = ""))))) ), b_r1, HSTACK( "Total Job Assignment Specialists", "", BYCOL(DROP(resbot, , 2), LAMBDA(c, LET(p, CHOOSECOLS(resbot, 1), SUM((p = INDEX(pcat, 4)) * (c = ""))))) ), b_r2, HSTACK( "Total Reclassification Specialists", "", BYCOL(DROP(resbot, , 2), LAMBDA(c, LET(p, CHOOSECOLS(resbot, 1), SUM((p = INDEX(pcat, 5)) * (c = ""))))) ), b_r3, HSTACK( "Total on Shift", "", BYCOL(DROP(resbot, , 2), LAMBDA(c, LET(p, CHOOSECOLS(resbot, 1), SUM(--(c = ""))))) ), fintbl, IF( sht = "1st", VSTACK(rone, rtwo, rthreea, restop, blnk, t_r1, t_r2, t_r3, blnk, rlow, resbot, blnk, b_r1, b_r2, b_r3, end, blnk), VSTACK(rone, rtwo, rthreeb, restop, blnk, t_r1, t_r2, t_r3, end, blnk) ), fintbl ))(Master!$J$2,Master!$J$3,Lists!$C$2#,Lists!$D$2#,$A$1,2)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A3,A4:AG80,A84:AG200Expression=$B3="Members"textNO
A3,A4:AG80,A84:AG200Expression=OR($A3="1st Shift",$A3="2nd Shift",$A3="3rd Shift",$A3="Supervisor/Team Lead/Specialist Positions")textNO
A3,A4:AG80,A84:AG200Expression=OR($A3="Total Supervisors/Team Leads",$A3="Total Classification Specialists",$A3="Total on Shift",$A3="Total Job Assignment Specialists",$A3="Total Reclassification Specialists")textNO
A3,A4:AG80,A84:AG200Expression=$A3="end"textNO
A83Expression=$B82="Members"textNO
A83Expression=OR($A83="1st Shift",$A83="2nd Shift",$A83="3rd Shift",$A83="Supervisor/Team Lead/Specialist Positions")textNO
A83Expression=OR($A83="Total Supervisors/Team Leads",$A83="Total Classification Specialists",$A83="Total on Shift",$A83="Total Job Assignment Specialists",$A83="Total Reclassification Specialists")textNO
A83Expression=$A83="end"textNO
B81:AG83Expression=$B81="Members"textNO
B82:AG82Expression=OR($A83="1st Shift",$A83="2nd Shift",$A83="3rd Shift",$A83="Supervisor/Team Lead/Specialist Positions")textNO
B82:AG82Expression=OR($A83="Total Supervisors/Team Leads",$A83="Total Classification Specialists",$A83="Total on Shift",$A83="Total Job Assignment Specialists",$A83="Total Reclassification Specialists")textNO
B82:AG82Expression=$A83="end"textNO
B81:AG81,B83:AG83Expression=OR(#REF!="1st Shift",#REF!="2nd Shift",#REF!="3rd Shift",#REF!="Supervisor/Team Lead/Specialist Positions")textNO
B81:AG81,B83:AG83Expression=OR(#REF!="Total Supervisors/Team Leads",#REF!="Total Classification Specialists",#REF!="Total on Shift",#REF!="Total Job Assignment Specialists",#REF!="Total Reclassification Specialists")textNO
B81:AG81,B83:AG83Expression=#REF!="end"textNO

 
Last edited:
Upvote 0
Kirk,

Thank you very much for your help, knowledge and expertise. Everything seems to be working really well.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,115
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top