If(AND Testing 2 logics

PCRIDE

Well-known Member
Joined
Jan 20, 2008
Messages
907
Hi, trying to get this to work and it's not working.

=IF(AND(W2>0,W2<=3),"1-3",FALSE) The value in W is 0 but I get a False.


Here is the entire formula
=IF(AND(W10>0,W10<=3,"1-3"),IF(AND(W10>3,W10<=7),"4-7"),IF(AND(W10>7,W10<=10),"7-10",IF(AND(W10>10,W10<=13),"10-13",IF(AND(W10>13,W10<=16),"13-16",IF(AND(W10>16,W10<=20),"16-20",IF(AND(W10>20,W10<=25),"20-25",IF(AND(W10>25,W10<=30),"25-30",IF(AND(W10>30,W10<=60),"30-60",IF(AND(W10>60,W10<=1000),"60+")))))))))


I am trying to categorize data in these categories.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Ok, I just discovered the zero vaule was a decimal. The first one works, but I can't get the entire formula to work.

Any ideas?
 
Upvote 0
Those darn parenthesis!!

=IF(AND(W2>=0,W2<=3),"1-3",IF(AND(W2>3,W2<=7),"4-7",IF(AND(W2>7,W2<=10),"7-10",IF(AND(W2>10,W2<=13),"10-13",IF(AND(W2>13,W2<=16),"13-16",IF(AND(W2>16,W2<=20),"16-20",IF(AND(W2>20,W2<=25),"20-25",IF(AND(W2>25,W2<=30),"25-30",IF(AND(W2>30,W2<=60),"30-60",IF(AND(W2>60,W2<=1000),"60+",""))))))))))

This works now.

Sometimes just getting it out there makes you re-think it....
 
Upvote 0

Forum statistics

Threads
1,224,617
Messages
6,179,914
Members
452,949
Latest member
beartooth91

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