IF function with triple condition & range

AdamS92

New Member
Joined
Mar 22, 2023
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Greetings,

im trying to achieve a single function where the following happens:

=IF(M3<30, "30 Days or less",""
=IF(M3>=31<=60, "30 to 60 days"
=IF(M3>=61<=90, "60 to 90 days"

So essentially, I'm looking at a bunch of resources where i want to see when their contract is due and separate it into 3 categories: 30 Days or less, 30 to 60 days and 60 to 90 days.
Number of Contracted days left is in column M

I understand how to develop something similar using =IF(and( as long as the values I'm comparing are static and not like in this case a range of "in between" also.

Thank you & any help or advice is much appreciated.
A
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(M3<=30, "30 Days or less",IF(M3<=60, "30 to 60 days",IF(M3<=90, "60 to 90 days","")))
 
Upvote 1
How about like this:
Excel Formula:
=LOOKUP(M3,{0,31,61,91},{"30 days or less","30 to 60 days","60 to 90 days","above 90 days"})
 
Upvote 1
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(M3<=30, "30 Days or less",IF(M3<=60, "30 to 60 days",IF(M3<=90, "60 to 90 days","")))
How about like this:
Excel Formula:
=LOOKUP(M3,{0,31,61,91},{"30 days or less","30 to 60 days","60 to 90 days","above 90 days"})

Thank you both, this was extremely fast. I really appreciate your help.

Both solutions do the job perfectly.

Have a Great Day.
A
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,928
Members
449,094
Latest member
teemeren

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