Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Using Roundup in an IF Statement

This is probably simple but I can't get it to work. I need to have
the number in D10, if is less than 50000, rounded up to the nearest
hundred. Then I need to apply the formula (((D10/1000)*0.23)*12) to
the rounded up number. If the number in D10 is 50,000 or more, the
formula should return a hard number, in this case it will be 138.

=IF((D10*1)<50000, roundup ((d10*1),2), (((D10/1000)*0.23)*12),138)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Using Roundup in an IF Statement

On Tue, 8 Dec 2009 11:14:33 -0800 (PST), LBW
wrote:

This is probably simple but I can't get it to work. I need to have
the number in D10, if is less than 50000, rounded up to the nearest
hundred. Then I need to apply the formula (((D10/1000)*0.23)*12) to
the rounded up number. If the number in D10 is 50,000 or more, the
formula should return a hard number, in this case it will be 138.

=IF((D10*1)<50000, roundup ((d10*1),2), (((D10/1000)*0.23)*12),138)



Try this formula:

=IF(D10<50000,ROUNDUP(D10,-2)*0.00276,138)

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Using Roundup in an IF Statement

"LBW" wrote:
rounded up to the nearest hundred.
[....]roundup ((d10*1),2)


Your ROUNDUP usage rounds up to the nearest hundredth (0.01), not the
nearest hundred (100). Which do you want?

As always, a numerical example would have been helpful to resolve
ambiguities and mistakes in the English description.

Noting that 50*0.23*12 is 138, I suspect the following is what you want to
compute:

=MIN(138, 0.23*12*ROUNDUP(D10,-2)/1000)

But if you want the result to be dollars or dollars and cents, use one of
the following:

dollars: =MIN(138, ROUND(0.23*12*ROUNDUP(D10,-2)/1000, 0))

cents: =MIN(138, ROUND(0.23*12*ROUNDUP(D10,-2)/1000, 2))

Change D10 to D10*1 or --D10 only if D10 is text (TYPE(D10)=2), not numeric
(TYPE(D10)=1). But why is D10 text?


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

"LBW" wrote in message
...
This is probably simple but I can't get it to work. I need to have
the number in D10, if is less than 50000, rounded up to the nearest
hundred. Then I need to apply the formula (((D10/1000)*0.23)*12) to
the rounded up number. If the number in D10 is 50,000 or more, the
formula should return a hard number, in this case it will be 138.

=IF((D10*1)<50000, roundup ((d10*1),2), (((D10/1000)*0.23)*12),138)


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
can't roundup sum swell estimator Excel Worksheet Functions 3 September 4th 08 03:48 AM
RoundUP juanpablo Excel Discussion (Misc queries) 11 July 9th 08 11:11 PM
Roundup Dennis1188 Excel Discussion (Misc queries) 5 March 6th 07 08:08 PM
roundup by 16s Sum Limit and marking Excel Worksheet Functions 3 July 28th 06 03:23 PM
ROUNDUP frustratedwthis Excel Discussion (Misc queries) 2 July 28th 05 09:03 PM


All times are GMT +1. The time now is 01:13 PM.

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

About Us

"It's about Microsoft Excel"