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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,430
Messages
6,119,442
Members
448,898
Latest member
drewmorgan128

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