Afternoon all! This calculation has been hurting my head. I have three fields in a collection for a mileage reimbursement form. For Context if you take your own vehicle and it's under 20 miles round trip, you get the full IRS mileage rate reimbursement. However, if it's over 20 miles, a company car was available and you still chose your own vehicle, you only get 25% of the rate for reimbursement. If it was over 20 miles and a company car wasn't available, you would get the full rate still.
=IF(AND(INDEX(Reimbursement_Information.Mileage,ROW())>20,Reimbursement_Information.Office_Vehicle_Available,ROW())="YES",INDEX(Reimbursement_Information.Mileage,ROW())*V_25__of_IRS_Reimbursement_Rate,INDEX(Reimbursement_Information.Mileage,ROW())*Current_IRS_Reimbursement_Rate)