# The concrete use case

We have three type of people working with us, the workers, the clerks and the consultants. The latter we leave out of the equation because they are not subject to labour laws, they have specific contracts with the employer.

## The intermediate solution to have something

I clicked together the solution as you see below by adding an extra column and selecting the right option. In this case this is possible, but once you run into a more complex set up, it no longer holds.

## Step 01

Before I could test the remainder function I had to define the list of items. Below how that goes. We limit the list by the length of the working day (in our case 8 hours, but if you live in an other country it can be 9 hours or 7.6 hours or 7.2 hours) and what I did next is in the light of what follows not really necessary, I also limited the list by the min take off value. I assumed this would be important, but this is wrong.

## Step 02

We evaluate this list using the `Remainder()` function. Below how I evaluated each item in the list, using a virtual sequence logic to run over every item in step 01 bringing `ForEach()` into play.´Although the min time off is formatted as Duration, I still had to apply `ToHours()` to make it work. I only got this by testing and trying.

## Step 03

This preparation was necessary to see the Remainder logic in action and only functioning with the `ToHours() `at the end. Step 03 is to add a filter that only accepts values that have zero as remaining value:

## Step 04

In previous blogs on lookups I wrote already:

--

--

## More from Christiaan Huizer

I use Coda mainly for (HR) planning & (budget) calculations. Follow me to learn how to Coda with numbers. I blog at least once per week.

## Get the Medium app

I use Coda mainly for (HR) planning & (budget) calculations. Follow me to learn how to Coda with numbers. I blog at least once per week.