Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
heater
 
Posts: n/a
Default Round in an IF statement

Where does the Round go in the following formula:

=IF($C$19<5000000,500000,IF($C$195000000,(D52/$D$95)*$C$19))

I want it to round to the nearest 1,000.
  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

=IF($C$19<5000000,500000,IF($C$195000000,round(D5 2/$D$95)*$C$19))
*******************
~Anne Troy

www.OfficeArticles.com


"heater" wrote in message
...
Where does the Round go in the following formula:

=IF($C$19<5000000,500000,IF($C$195000000,(D52/$D$95)*$C$19))

I want it to round to the nearest 1,000.



  #3   Report Post  
Anne Troy
 
Posts: n/a
Default

Ooops!!
=IF($C$19<5000000,500000,IF($C$195000000,round((D 52/$D$95)*$C$19),-3)))
*******************
~Anne Troy

www.OfficeArticles.com


"heater" wrote in message
...
Where does the Round go in the following formula:

=IF($C$19<5000000,500000,IF($C$195000000,(D52/$D$95)*$C$19))

I want it to round to the nearest 1,000.



  #4   Report Post  
heater
 
Posts: n/a
Default

It actually is

=IF($C$19<5000000,500000,IF($C$195000000,ROUND((D 52/$D$95)*$C$19,-3)))

Thanks for the direction.

"Anne Troy" wrote:

Ooops!!
=IF($C$19<5000000,500000,IF($C$195000000,round((D 52/$D$95)*$C$19),-3)))
*******************
~Anne Troy

www.OfficeArticles.com


"heater" wrote in message
...
Where does the Round go in the following formula:

=IF($C$19<5000000,500000,IF($C$195000000,(D52/$D$95)*$C$19))

I want it to round to the nearest 1,000.




  #5   Report Post  
Peter Aitken
 
Posts: n/a
Default

"heater" wrote in message
...
Where does the Round go in the following formula:

=IF($C$19<5000000,500000,IF($C$195000000,(D52/$D$95)*$C$19))

I want it to round to the nearest 1,000.


Divide by 1000, round, then multiply by 1000.


--
Peter Aitken

Remove the crap from my email address before using.




  #6   Report Post  
 
Posts: n/a
Default

heater wrote:
Where does the Round go in the following formula:
=IF($C$19<5000000,500000,IF($C$195000000,(D52/$D$95)*$C$19))
I want it to round to the nearest 1,000.


You got your answer, and there is nothing wrong with
it. But I'm curious .... Why not simply round the IF()
result? That is:

= ROUND(IF(..., ..., ...), -3)

Probably easier for someone else to read. It does not
matter that 500000 is already rounded to the desired
degree.

The only time that would not work for you is if you
do not want the result of one of the clauses to be
rounded. I think that would be unusual. For example:

=IF(..., 543210, ROUND(..., -3))

PS: Are you sure you wrote the nested IF() functions
as you intended for your purposes? They result in the
word "FALSE" when $C$19 is 500000, but it results in
500000 when $C$19 is less than 500000. Seems a bit odd.

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
Round a number in nested function kim Excel Worksheet Functions 1 July 6th 05 11:45 AM
Round whole numbers up and down JoeBed Excel Discussion (Misc queries) 4 July 5th 05 05:21 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
How do I ROUND() round off decimals of a column dataset? Højrup Excel Worksheet Functions 2 January 12th 05 10:50 AM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM


All times are GMT +1. The time now is 05:36 AM.

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"