Nested if statement

ariel20029

Board Regular
Joined
Jun 20, 2013
Messages
97
Hi ,
I am getting an error message in excel with this formula. Can you please help.


1st its looking to see if it is a duplicate row and returning 0 if so
2 its looking to see what quarter the order falls in and if the end date is after the quarter then return 100000 else 0.
thanks,
Sharon


=IF(AS31="DUP",0,IF(BB31>=1,0,IF(AND(C31="2014-Q1",R31>= DATEVALUE("4/1/2015"),100000,IF(AND(C31="2014-Q2",R31>=DATEVALUE("7/1/2015"),100000,IF(AND(C31="2014-Q3",R31>=DATEVALUE("10/1/2015"),100000,IF(AND(C31="2014-Q4",R31<DATEVALUE("1/1/2016"),100000,0))))))

thanks,
Sharon
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
your formula is incomplete but in what is possible to see in your post, you might have to hange some parenthesis, something like:

=IF(AS31="DUP",0,IF(BB31>=1,0,IF(AND(C31="2014-Q1",R31>= DATEVALUE(4/1/2015)),100000,IF(AND(C31="2014-Q2",R31>=DATEVALUE(7/1/2015)),100000,IF(AND(C31="2014-Q3",R31>=DATEVALUE(10/1/2015)),100000,IF(AND(C31="2014-Q4",R31<datevalue("1 1="" 2016"),100000,0))))))
</datevalue("1>
 
Upvote 0
your formula is incomplete but in what is possible to see in your post, you might have to hange some parenthesis, something like:

=IF(AS31="DUP",0,IF(BB31>=1,0,IF(AND(C31="2014-Q1",R31>= DATEVALUE(4/1/2015)),100000,IF(AND(C31="2014-Q2",R31>=DATEVALUE(7/1/2015)),100000,IF(AND(C31="2014-Q3",R31>=DATEVALUE(10/1/2015)),100000,IF(AND(C31="2014-Q4",R31<datevalue("1 1="" 2016"),100000,0))))))
</datevalue("1>

Hi, I made the change you recommended, but Im still not getting a value returned.

=IF(AS2="DUP",0,IF(BB2>=1,0,IF(AND(C2="2014-Q1",R2>=DATEVALUE("4/1/2015")),100000,IF(AND(C2="2014-Q2",R2>=DATEVALUE("7/1/2015")),100000,IF(AND(C2="2014-Q3",R2>=DATEVALUE("10/1/2015")),100000,IF(AND(C2="2014-Q4",R2<DATEVALUE("1/1/2016")),100000,0))))))
 
Upvote 0
Try to put the complete formula you have, since the one above is incomplete again.
You have to use spaces before and after the operators >=
 
Upvote 0
=IF(AS5="DUP",0,IF(BB5>=1,0,IF(AND(C5="2014-Q1",R5>=DATEVALUE("4/1/2015")),100000,IF(AND(C5="2014-Q2",R5>=DATEVALUE("7/1/2015")),100000,IF(AND(C5="2014-Q3",R5>=DATEVALUE("10/1/2015")),100000,IF(AND(C5="2014-Q4",R5<DATEVALUE("1/1/2016")),100000,0))))))

Ok sorry this is the complete formula.
Sharon
 
Upvote 0
It keeps cutting off the formula.
,R5>=DATEVALUE("10/1/2015")),100000,IF(AND(C5="2014-Q4",R5<DATEVALUE("1/1/2016")),100000,0))))))
 
Upvote 0
I don't know what to do it keeps cutting off the formula.

=IF(AS5="DUP",0,IF(BB5>=1,0,IF(AND(C5="2014-Q1",R5>=DATEVALUE("4/1/2015")),100000,IF(AND(C5="2014-Q2",R5>=DATEVALUE("7/1/2015")),100000,IF(AND(C5="2014-Q3",R5>=DATEVALUE("10/1/2015")),100000,IF(AND(C5="2014-Q4",R5<DATEVALUE("1/1/2016")),100000,0))))))
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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