Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Advanced Formula troubles

I need to do the following calculation:

((1-((1-AE5)*10))*V14)

but only when:

((1-((1-AE5)*10))*V14)=0 or <=V14*1.5

If greater than or = to V14*1.5 then =V14*1.5
And if less than or = 0 then =0


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Advanced Formula troubles

Replace CALC with your calculation

=IF(AND(CALC=0,CALC<=v14*1.5),CALC,IF(CALC<0,0,CA LC))

Your last statement is confusing. "And if less than or = 0 then =0"...equal
to zero is mentioned in the 1st condition..So this should be 'less than' .


--
Jacob (MVP - Excel)


"Eves" wrote:

I need to do the following calculation:

((1-((1-AE5)*10))*V14)

but only when:

((1-((1-AE5)*10))*V14)=0 or <=V14*1.5

If greater than or = to V14*1.5 then =V14*1.5
And if less than or = 0 then =0


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Advanced Formula troubles

"Eves" wrote:
((1-((1-AE5)*10))*V14)
but only when:
((1-((1-AE5)*10))*V14)=0 or <=V14*1.5
If greater than or = to V14*1.5 then =V14*1.5
And if less than or = 0 then =0


I think the following does what you want:

=max(0, min(V14*1.5,(1-(1-AE5)*10)*V14))

Note that it can be simplified to:

=max(0, V14*min(1.5,10*AE5-9))

I discovered that the two formulas are infinitesimally different in some
cases, due to floating-point computation anomalies. But in fact, I think the
second formula is closer to the expected behavior.

Based on your constraints, we expect 1.5*VE14 when AE5=1.05 (and VE140),
and we expect zero when AE5<=0.9 (or VE14<=0).


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

"Eves" wrote:
I need to do the following calculation:

((1-((1-AE5)*10))*V14)

but only when:

((1-((1-AE5)*10))*V14)=0 or <=V14*1.5

If greater than or = to V14*1.5 then =V14*1.5
And if less than or = 0 then =0


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Advanced Formula troubles

Errata (typo)....

I wrote:
Based on your constraints, we expect 1.5*VE14 when AE5=1.05
(and VE140), and we expect zero when AE5<=0.9 (or VE14<=0).


Obviously, I meant: we expect 1.5*V14 when AE5=1.05 (and V140), and we
expect zero when AE5<=0.9 (or V14<=0).


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

"Joe User" <joeu2004 wrote in message
...
"Eves" wrote:
((1-((1-AE5)*10))*V14)
but only when:
((1-((1-AE5)*10))*V14)=0 or <=V14*1.5
If greater than or = to V14*1.5 then =V14*1.5
And if less than or = 0 then =0


I think the following does what you want:

=max(0, min(V14*1.5,(1-(1-AE5)*10)*V14))

Note that it can be simplified to:

=max(0, V14*min(1.5,10*AE5-9))

I discovered that the two formulas are infinitesimally different in some
cases, due to floating-point computation anomalies. But in fact, I think
the
second formula is closer to the expected behavior.

Based on your constraints, we expect 1.5*VE14 when AE5=1.05 (and VE140),
and we expect zero when AE5<=0.9 (or VE14<=0).


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

"Eves" wrote:
I need to do the following calculation:

((1-((1-AE5)*10))*V14)

but only when:

((1-((1-AE5)*10))*V14)=0 or <=V14*1.5

If greater than or = to V14*1.5 then =V14*1.5
And if less than or = 0 then =0



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Formula troubles lmh Excel Worksheet Functions 7 August 13th 09 10:08 PM
Formula troubles Excluxe Excel Discussion (Misc queries) 6 July 16th 07 04:16 PM
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
Advanced Formula... Steven Sinclair Excel Discussion (Misc queries) 2 November 14th 05 08:26 PM
Formula Troubles........ Tracy B Excel Worksheet Functions 0 April 8th 05 03:35 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"