Let us say you have 1000 m3 of excavation and your productivity rate is 2 m3 per hour. We have 2 scenarios:
Scenario 1: Limited Resources and Flexible duration
In that case, as per available resources, let us say you have 10 resources and every one working 8 hours per day, it means you have 80 working hours per day.
The required working hours = quantity / productivity = 1000 / 2 = 500 working hours.
Activity Duration = 500 / 80 = 6.25 working day
Scenario 2: Flexible Resources and Fixed duration
In that case, if you have a duration of 5 days to finish this task.
Required working hours = quantity / productivity = 1000 / 2 = 500 working hours.
Required working days = 500 / 8 = 62.5 working days
Required crew to finish in 5 days = 62.5 / 5 = 12.5 worker per day.