Forum Discussion
mkissel1
Jan 07, 2023Copper Contributor
How to associate a word with 0 hours
I am trying to make a work schedule. I am not good with Excel. I am using an excel sheet that allows me to calculate the total hours worked for each person for that week. The only issue I am having i...
PeterBartholomew1
Jan 07, 2023Silver Contributor
Note: This is not really an answer to the OP, It assumes 365 and familiarity with dynamic arrays.
= LET(
time, IF(ISNUMBER(times), times, 0),
timeFrom, FILTER(time,event="From:"),
timeTo, FILTER(time,event="To:"),
hours, 24*(timeTo - timeFrom),
totals, BYCOL(hours, LAMBDA(x,SUM(x))),
pay, totals * hourlyRate,
TOROW(VSTACK(totals, pay), ,TRUE)
)
The purpose of the solution is to explore options for accepting an alternating pattern of input data and displaying the result as a single array formula.