ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using multiple IF statements (https://www.excelbanter.com/excel-worksheet-functions/260718-using-multiple-if-statements.html)

KMBOhio

Using multiple IF statements
 
I am trying to create a formula using multiple IF statements. Individually
they all work but I don't know how to connect them in into one formula.
Basically, 4 possible date ranges that would each produce a different text
value. Any suggestions?

=IF(AND(I1=DATEVALUE("1-Jan"),I1<=DATEVALUE("31-Mar")),"Spring
Assortment")*IF(AND(I1=DATEVALUE("1-Apr"),I1<=DATEVALUE("30-Jun")),"Summer
Assortment")*IF(AND(I1=DATEVALUE("1-Jul"),I1<=DATEVALUE("30-Sep")),"Fall
Assortment")*IF(AND(I1=DATEVALUE("1-Oct"),I1<=DATEVALUE("31-Dec")),"Holiday
Assortment")


Joe User[_2_]

Using multiple IF statements
 
"KMBOhio" wrote:
Basically, 4 possible date ranges that would
each produce a different text value. Any
suggestions?


=IF(I1<DATEVALUE("1-Apr"), "Spring Assortment",
IF(I1<DATEVALUE("1-Jul"), "Summer Assortment".
IF(I1<DATEVALUE("1-Oct"),"Fall Assortment",
"Holiday Assortment")))

I don't like the use of DATEVALUE. I would be inclined to use
DATE(YEAR(I1),4,1) instead of DATEVALUE("1-Apr"), for example.


----- original message -----

"KMBOhio" wrote:
I am trying to create a formula using multiple IF statements. Individually
they all work but I don't know how to connect them in into one formula.
Basically, 4 possible date ranges that would each produce a different text
value. Any suggestions?

=IF(AND(I1=DATEVALUE("1-Jan"),I1<=DATEVALUE("31-Mar")),"Spring
Assortment")*IF(AND(I1=DATEVALUE("1-Apr"),I1<=DATEVALUE("30-Jun")),"Summer
Assortment")*IF(AND(I1=DATEVALUE("1-Jul"),I1<=DATEVALUE("30-Sep")),"Fall
Assortment")*IF(AND(I1=DATEVALUE("1-Oct"),I1<=DATEVALUE("31-Dec")),"Holiday
Assortment")



All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com