Selected Answer
You didn't include a sample file so I'm taking a guess that the page layout is something like this:
Row 1 is a header row withcolumns "A" being "Name", "B" is "Arrival Time", "C" is Leave Time", "D" is "Duration Time, "E" is "Rate per Minute", and "F" is "Charge"
Data for "A","B", "C", and "E" are keyed in; "D" and "F" are calculated using formulas.These can be worksheet formulas or VBA. If you opt for VBA you wil also need to create variables. "Arrival" and "Leave Time" must be entered with Am/PM or using the24hr clock (military time, ie 3:48 PM is 15:48)
Worksheet formulas: for the "Duration Time": =IF(C2>B2, C2-B2, 1-B2+C2). For "Charge": =(HOUR(D2)*60 + MINUTE(D2)) * E2. {copy down the sheet for as many rows as needed}
Using VBA: (calculations done in minutes) for the "Duration Time":If sTmin < eTmin Then dTmin = eTmin - sTmin Else dTmin = 1440 - sTmin + eTmin. For "Charge": Range("F2") = dTime * Range("E1").Value; {variables used: sTmin = arrival, eTmin is leave, dTmin = duration in minutes. If using multiple rows (one for each guest) you will need to incorporate a loop to cycle through each row containing data. To reset the "Arrival" and "Leave" times you could use code something like: Range("B1:C1").ClearContents
I have attached a file with both macro and worksheet examples.
Hope this helps.