Using Time in IF functions

G

Guest

Guest
I am making a spreadsheet for calculating long distance usage. I would like a formula to calculate the charge based on the time of the call and the duration. For example, a 15 minute call would be more expensive before 5pm. I would you would use an IF formula but I don't know how to format the time.

=IF(A1<(i want this to be 5pm),B1*.09,B1*.07)

Please help! This is bothering me!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
On 2002-03-04 13:33, Anonymous wrote:
I am making a spreadsheet for calculating long distance usage. I would like a formula to calculate the charge based on the time of the call and the duration. For example, a 15 minute call would be more expensive before 5pm. I would you would use an IF formula but I don't know how to format the time.

=IF(A1<(i want this to be 5pm),B1*.09,B1*.07)

Please help! This is bothering me!

=IF(A1<"17:00"+0,B1*.09,B1*.07)
 
Upvote 0
Try putting 5:00 PM in another cell, and replace your (I want the time here bit) with the cell reference.
HTH
Richard
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

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