Help on formula

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,232
Hi All,
I don't understand what goes wrong with this formula..

Code:
[TABLE="width: 366"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Col AS2[/TD]
[TD]Col AT2[/TD]
[TD]Col AU2[/TD]
[/TR]
[TR]
[TD]Renewal[/TD]
[TD]68:43:42[/TD]
[TD]formula[/TD]
[/TR]
[TR]
[TD]Col AS3[/TD]
[TD]Col AT3[/TD]
[TD]Col AU3[/TD]
[/TR]
[TR]
[TD]Renewal[/TD]
[TD]36:17:57[/TD]
[TD]formula[/TD]
[/TR]
</tbody>[/TABLE]

formula is
Code:
=IF(AND($AS2="Renewal",$AT2<=TIMEVALUE("24:00:00")),"Achieved",IF(AND($AS2="Renewal",$AT2>TIMEVALUE("24:00:00")),"Not Achieved","NA")))


=IF(AND($AS3="Renewal",$AT3<=TIMEVALUE("24:00:00")),"Achieved",IF(AND($AS3="Renewal",$AT3>TIMEVALUE("24:00:00")),"Not Achieved","NA")))

output getting..
Not Achieved
Not Achieved

Why less than 24 hour not captured properly..??
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
will that work?

Code:
=IF(AND($AS2="Renewal",$AT2<=1),"Achieved",IF(AND($AS2="Renewal",$AT2>1),"Not Achieved","NA"))
 
Upvote 0
I'm not all that familiar with timevalue, but according to the wizard it will never be more than 1 or less than zero. It assigns a decimal value to a time...if I'm understanding right. I tried it on "10:00 PM" and it showed a value of 0.91.....
 
Upvote 0
AT2 contains another formula..
Code:
=(NETWORKDAYS($AG2,$AH2,Lookup_table!$J$2:$J$9)-1)*("19:00"-"7:00")+IF(NETWORKDAYS($AH2,$AH2,Lookup_table!$J$2:$J$9),MEDIAN(MOD($AH2,1),"19:00","7:00"),"19:00")-MEDIAN(NETWORKDAYS($AG2,$AG2,Lookup_table!$J$2:$J$9)*MOD($AG2,1),"19:00","7:00")
which outputs..
 
Upvote 0
ok. now i have design formula like this..
Code:
IF(AND($AS2="Renewal",INT(AT2)<24),"Achieved",IF(AND($AS2="Renewal",INT(AT2)>24),"Not Achieved","NA")))
and, values which are less than 24:00:00, getting correct output "Achieved".

but values like..
Code:
390:16:48
36:17:57
28:05:09
24:57:14
also getting "achieved"...How is this possible..?? Can any one correct me on this..
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,770
Members
449,095
Latest member
m_smith_solihull

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