# If function multiple options question ..

#### Jamlcfc

##### New Member
Afternoon All ,

What a fantastic resource this is and i am hope to become a regular contributor as i further my Excel Knowledge .....

Spent quite a while trying to work out a multiple `If function` and am seeking some help and guidance please ,

I have a time calculation and I am calculating the difference between two times and adding a `word response` - not looking to include the calculation into the `IF` just working on the cell with the calculation outcome

If the sum answer is less than or equal to -30 minutes and not greater than or equal to 30 minutes (1 hour window) then this is - ON TIME
If the sum answer is greater than 30 minutes then this is LATE
If the sum answer is more than -30 minutes then this is EARLY

Any advice on pulling this into a single formula with the above noted outcomes ?

Thank you for your time and assistance.

### Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

##### Active Member
Hi Jamlcfc and welcome

This should do it
Excel Formula:
``=IF(AND(D2>-30,D2<30),"ON TIME",IF(D2<=-30,"Early","Late"))``

D2 is the number its checking

Added bonus, copy and paste your code in "D2"(or where ever it is) over everywhere it says D2 in the above code to omit the need for D2 all together

Have fun

Excel Fan

#### Jamlcfc

##### New Member
thank you

Replies
6
Views
586
Replies
5
Views
156
Replies
8
Views
781
Replies
9
Views
948
Replies
1
Views
530

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,120
Messages
5,768,224
Members
425,460
Latest member
Astros1243

### 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.

### Which adblocker are you using?

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

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