R
rsikin
Good Evening
I am trying to write a macro for our travel statement. I am trying to
use sumproduct. Any help would be gratefull. Thanks. I also have
attached a sample sheet.
1st Scenario
If an employee is out of the office and less than 24 hours and less
than or equal to 125 miles then .485 time miles or if more than 125
miles than $60.625 plus .15 times miles greater than 125.
2nd Scenario
If an employee is out of the office and greater than or equal to 24
hours but less than 48 and less than or equal to 250 miles then .485
time miles or if more than 250 miles than $121.25 plus .15 times miles
greater than 250.
3rd Scenario
If an employee is out of the office and greater than or equal to 48
hours but less than 72 and less than or equal to 375 miles then .485
time miles or if more than 375 miles than $181.88 plus .15 times miles
greater than 375.
4th Scenario
If an employee is out of the office and greater than or equal to 72
hours but less than 96 and less than or equal to 500 miles then .485
time miles or if more than 500 miles than $242.50 plus .15 times miles
greater than 500.
5th Scenario & Final
If an employee is out of the office and greater than or equal to 96
hours but less than 120 and less than or equal to 625 miles then .485
time miles or if more than 625 miles than $303.13 plus .15 times miles
greater than 625.
+-------------------------------------------------------------------+
|Filename: Mileage.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3868 |
+-------------------------------------------------------------------+
I am trying to write a macro for our travel statement. I am trying to
use sumproduct. Any help would be gratefull. Thanks. I also have
attached a sample sheet.
1st Scenario
If an employee is out of the office and less than 24 hours and less
than or equal to 125 miles then .485 time miles or if more than 125
miles than $60.625 plus .15 times miles greater than 125.
2nd Scenario
If an employee is out of the office and greater than or equal to 24
hours but less than 48 and less than or equal to 250 miles then .485
time miles or if more than 250 miles than $121.25 plus .15 times miles
greater than 250.
3rd Scenario
If an employee is out of the office and greater than or equal to 48
hours but less than 72 and less than or equal to 375 miles then .485
time miles or if more than 375 miles than $181.88 plus .15 times miles
greater than 375.
4th Scenario
If an employee is out of the office and greater than or equal to 72
hours but less than 96 and less than or equal to 500 miles then .485
time miles or if more than 500 miles than $242.50 plus .15 times miles
greater than 500.
5th Scenario & Final
If an employee is out of the office and greater than or equal to 96
hours but less than 120 and less than or equal to 625 miles then .485
time miles or if more than 625 miles than $303.13 plus .15 times miles
greater than 625.
+-------------------------------------------------------------------+
|Filename: Mileage.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3868 |
+-------------------------------------------------------------------+