Landscaping Company: Matching Units, Volume, and Labor Hours to Hourly Labor Rate

nirvehex

Well-known Member
Joined
Jul 27, 2011
Messages
505
Office Version
  1. 365
Platform
  1. Windows
Hello There!

Here’s what I’m trying to do:

For a landscaping company, who is looking to service gardens more effectively/efficiently, they are mirroring the below variables to the amount the client is willing to pay per hour. And let me first say if any of this doesn’t make any sense or needs clarification, let me know or private message me. I also have a sample file which may be of help. Just not sure how to send it, if I can, or not.

Thank you! Please read on:

I have, on Sheet1, 8 columns I’m working with:
R3:R132 is the currently hourly rate
L3:L132, M3:M132, N3:N132 are current units, volume, and labor hours respectively by location.
AD3:AD132, AE3:AE132, AF3:AF132 are new units, volume, and labor hours respectively by location.
AI3:AI132 is the suggested hourly rate by location. Note this is already calculated and filled in. I need to calculate new units, volume, and labor hours based on the suggested hourly rate.

On Sheet2, I have 4 columns I’m working with:
A2:A161, B2:B161, C2:C161, B2:B161 are hourly rates, units, volume, and labor hours respectively.
They are laid out in combination with one another to show possible combinations of these variables that make sense for the landscaping company.
My goal is to figure out what combination the company wants to go with for a given hourly rate on Sheet1 given the following logic to follow:

1) Attempt to reduce labor hours to get to suggested hourly rate – This is to calculate new labor hours on Sheet1 in cells AF3:AF132.

If
If suggested hourly rate = current hourly rate keep same units, volume, and labor hours
Else if labor hours is <=.25, move to step 2
else find a suggested hourly rate on Sheet2 that has labor hours of current labor hours/2
else find a suggested hourly rate on Sheet2 that has labor hours of current labor hours -1
else find a suggested hourly rate on Sheet2 that has labor hours of current labor hours -2
else find a suggested hourly rate on Sheet2 that has labor hours of current labor hours -3
end if

else

2) Attempt to reduce units to get to get to suggested hourly rate – This is to calculate new units on Sheet1 in cells AD3:AD132

if units = 1, move to step 3
else find a suggested hourly rate on Sheet2 that has units of current units/2
else find a suggested hourly rate on Sheet2 that has units of current units -1
else find a suggested hourly rate on Sheet2 that has units of current units -2
else find a suggested hourly rate on Sheet2 that has units of current units -3
else find a suggested hourly rate on Sheet2 that has units of current units -4
else find a suggested hourly rate on Sheet2 that has units of current units -5
end if

else

3) Attempt to reduce volume to get to suggested hourly rate – This is to calculate new volume on Sheet1 in cells AE3:AE132

if volume <=2, keep current units, volume, and labor hours
else find a suggested hourly rate on Sheet2 that has volume of current volume/2
else find a suggested hourly rate on Sheet2 that has volume of current volume-1
else find a suggested hourly rate on Sheet2 that has volume of current volume-2
else find a suggested hourly rate on Sheet2 that has volume of current volume-3
else find a suggested hourly rate on Sheet2 that has volume of current volume-4
end if
else
keep current units, volume, and labor hours
end if

Note I have a current formula which I’ve been working at which ALMOST calculates the new labor hours, but sometimes it generates an #N/A. No idea how to calculate all three variables at the same time. Maybe a concatenation of some sort and then a left right formula to separate it back out?
Code:
=IF(AI3=R3,N3,IF(N3<=0.25,N3,IF(AND(N3/2=VLOOKUP(AI3,'Sheet2'!A:D,4,FALSE),L3=VLOOKUP(AI3,'Sheet2'!A:D,2,FALSE),M3=VLOOKUP(AI3,'Sheet2'!A:D,3,FALSE)),N3/2,IF(AND(N3-1=VLOOKUP(AI3,'Sheet2'!A:D,4,FALSE),L3=VLOOKUP(AI3,'Sheet2'!A:D,2,FALSE),M3=VLOOKUP(AI3,'Sheet2'!A:D,3,FALSE)),N3-1,IF(AND(N3-2=VLOOKUP(AI3,'Sheet2'!A:D,4,FALSE),L3=VLOOKUP(AI3,'Sheet2'!A:D,2,FALSE),M3=VLOOKUP(AI3,'Sheet2'!A:D,3,FALSE)),N3-2,IF(AND(N3-3=VLOOKUP(AI3,'Sheet2'!A:D,4,FALSE),L3=VLOOKUP(AI3,'Sheet2'!A:D,2,FALSE),M3=VLOOKUP(AI3,'Sheet2'!A:D,3,FALSE)),N3-3,N3))))))

Again, if any of this doesn’t make sense or needs clarification, let me know or Private message me.
Thank you very much!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I get a vague idea what is going on but as so many things are happening it difficult to see the woods from the trees. I personally post a file in a message with a link from sendspace.com or some people like to use Dropbox.

Just a couple of quick things as your formula is long and any shortening helps you could re[lace the 12 "FALSE" with "0" which is shorter and makes reading a little easier.

Secondly as the 1st two if's end up with N3 as the result you could shorten them into 1 if statement i.e.


=IF(AI3=R3,N3,IF(N3<=0.25,N3,............

becomes

=IF(OR(AI3=R3,N3<=0.25),N3,.............. a saving of 2 characters :)

Cheers
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,920
Members
449,195
Latest member
Stevenciu

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