Greater than and Less than

hcabs99

Active Member
Joined
May 9, 2006
Messages
257
Hi all

Some advise please.

I have a program set up which generates a sequential list of times , the gap between each time is set by a users entered value. All of that works fine, but what i need Excel to do, is to increment the date whenever we go past midnight. So , i have built this formula which works fine if the user has selected hourly intervals, but if they select half hours (for example), it doe not calculate correctly.

To get round this, i need the formula below to work with a greater than 2 and less than 3 (for example)

=IF(I13>1;1)+IF(I13<2;1)+IF(I13=2;2)+IF(I13=3;3)+IF(I13=3.99999999901047;4)+IF(I13=5;5)+IF(I13=6;6)+IF(I13=7;7)

I'm sure its possible, but i get errors everytime i do it.

Note..I have changed my regional settings to use ; instead of , in case this confuses anyone!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

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