Need formula rectification..

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,284
Office Version
  1. 365
Platform
  1. Windows
Error - You formula is missing Parenthesis..What is this error..
Code:
=IF(AND(AN2="MR",INT(24*AO2)>8),"> 8 Hrs",IF(AND(AN2="MR",INT(24*AO2)<8),"< 8 Hrs"),IF(AND(AN2="MRR",INT(24*AO2)>1.5),"> 1.5 Hrs",IF(AND(AN2="MRR",INT(24*AO2)<1.5),"< 1.5 Hrs",IF(AND(AN2="RR",INT(24*AO2)>24),"> 24 Hrs",IF(AND(AN2="RR",INT(24*AO2)<24),"< 24 Hrs",INT(24*AO2)))
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I have given all the parenthesis..Can one resolve this..Thanks in advance..Cheers.!!
 
Upvote 0
You are closing your IF statements. Remove the closing ) and place it at the end of the formula.
 
Upvote 0
Try this,

=IF(AND(AN2="MR",INT(24*AO2)>8),"> 8 Hrs",IF(AND(AN2="MR",INT(24*AO2)<8),"< 8 Hrs",IF(AND(AN2="MRR",INT(24*AO2)>1.5),"> 1.5 Hrs",IF(AND(AN2="MRR",INT(24*AO2)<1.5),"< 1.5 Hrs",IF(AND(AN2="RR",INT(24*AO2)>24),"> 24 Hrs",IF(AND(AN2="RR",INT(24*AO2)<24),"< 24 Hrs",INT(24*AO2)))))))
 
Upvote 0
If you "split" your formula onto individual lines by pressing Alt+Return, you get the following:
Code:
=IF(AND(AN2="MR",INT(24*AO2)>8),"> 8 Hrs",
IF(AND(AN2="MR",INT(24*AO2)<8),"< 8 Hrs"),
IF(AND(AN2="MRR",INT(24*AO2)>1.5),"> 1.5 Hrs",
IF(AND(AN2="MRR",INT(24*AO2)<1.5),"< 1.5 Hrs",
IF(AND(AN2="RR",INT(24*AO2)>24),"> 24 Hrs",
IF(AND(AN2="RR",INT(24*AO2)<24),"< 24 Hrs",INT(24*AO2)))

This shows that you've got a closing bracket at the end of your second IF statement that shouldn't be there. Delete that, and add the correct number of closing brackets at the end to fix the formula.
 
Upvote 0
Can you please re correct above formula, and highlight the change..i really dont understand..
=IF(AND(AN2="MR",INT(24*AO2)>8),"> 8 Hrs",IF(AND(AN2="MR",INT(24*AO2)<8),"< 8 Hrs"),IF(AND(AN2="MRR",INT(24*AO2)>1.5),"> 1.5 Hrs",IF(AND(AN2="MRR",INT(24*AO2)<1.5),"< 1.5 Hrs",IF(AND(AN2="RR",INT(24*AO2)>24),"> 24 Hrs",IF(AND(AN2="RR",INT(24*AO2)<24),"< 24 Hrs",INT(24*AO2)))

the text in the formula highlighted above should not include that round bracket there. it should be like this "8 HRS", instead of "8 HRS"),
 
Upvote 0
Hello All,
with the same query i have question on formula..
Code:
[COLOR=#333333]=IF(AND(AN2="MR",INT(24*AO2)>8),"> 8 Hrs",IF(AND(AN2="MR",INT(24*AO2)<8),"< 8 Hrs",[/COLOR][COLOR=#ff0000]IF(AND(AN2="MRR",INT(24*AO2)>1.5),"> 1.5 Hrs",IF(AND(AN2="MRR",INT(24*AO2)<1.5),"< 1.5 Hrs"[/COLOR][COLOR=#333333],IF(AND(AN2="RR",INT(24*AO2)>24),"> 24 Hrs",IF(AND(AN2="RR",INT(24*AO2)<24),"< 24 Hrs",INT(24*AO2)))))))[/COLOR]
In above formula..condition..which red color highlighted..there I need something like below..
- instead of showing hour i need output in Minutes...example..
if time showing in AO2 = 0.26.26 then "0.30 Min" as output Or somewhere showing 30 Min of gap till 1.5 Hrs. Above 1.5 Hrs will display as a "> 1.5 Hrs"...

Can any one please suggest
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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