Excel IF statement

JDeMaro22
StarLounger
Posts: 94
Joined: 16 Oct 2021, 16:22

Excel IF statement

Post by JDeMaro22 »

Hi,

I'm looking for some type of IF statement that can tell if a value is between a certain range then provide a response. My criteria are as follows:

0-30 Days
30-60 Days
61-90 Days
91-120 Days
121-160 Days
161-190 Days
191-365 Days
365+ Days

I just need a formula that will look at a column of values and determine which category it fits it.
Capture.PNG
Thank you,

Joshua
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel IF statement

Post by HansV »

Create a range as shown below in columns E and F. It can be anywhere though, even on another sheet.

S2424.png

The formula in B2 is

=VLOOKUP(A2,$E$2:$F$9,2)

Alternatively, if you have Microsoft 365 or Office 2021:

=XLOOKUP(A2,$E$2:$E$9,$F$2:$F$9,,-1)

This can be filled down.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

JDeMaro22
StarLounger
Posts: 94
Joined: 16 Oct 2021, 16:22

Re: Excel IF statement

Post by JDeMaro22 »

That works, Thanks Hans!

snb
4StarLounger
Posts: 575
Joined: 14 Nov 2012, 16:06

Re: Excel IF statement

Post by snb »

Why an interval of 30 except 121-161 ?