Using Time in IF functions

  • Thread starter Thread starter Guest
  • Start date Start date
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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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,223,369
Messages
6,171,684
Members
452,417
Latest member
gilly01625

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