Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Round to numbers in a list

I have an quation that gives me a number for the size of a steel rod.
The steel rods we use are only certain sizes so not just any size wil
do. The rod size I get in this equation I would like it to look at
list of the correct rod sizes and round up to the next size on the lis
we use.

NOTE: The sizes we use are not uniform so there is NOT an equa
distance between rod sizes.

Thank you
Jaso

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Round to numbers in a list

Use INDEX and MATCH. Assuming your list of sizes is in A1:A10, sorted in
DESCENDING order, ie with the largest figure in A1 and smallest in A10, and
assuming the value you were looking up is in say C1:-

=INDEX(A1:A10,MATCH(C1,A1:A10,-1))

If you have a formula that returns the value you want to look up, you can always
combine it with this, ie

=INDEX(A1:A10,MATCH(Your_Formula,A1:A10,-1))

What the formula does is to find the smallest value that is *greater* than or
equal to the value being looked up, hence it will give you the minimum size of
pipe you need to be able to get the job done.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Jay3253 " wrote in message
...
I have an quation that gives me a number for the size of a steel rod.
The steel rods we use are only certain sizes so not just any size will
do. The rod size I get in this equation I would like it to look at a
list of the correct rod sizes and round up to the next size on the list
we use.

NOTE: The sizes we use are not uniform so there is NOT an equal
distance between rod sizes.

Thank you
Jason


---
Message posted from http://www.ExcelForum.com/



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.592 / Virus Database: 375 - Release Date: 18/02/2004


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Round to numbers in a list

Hi
maybe this will help you:
Assumptions:
- column A of your list stores the rod-size values
- the column is sorted descending!!
- cell B1 stores the size to lookup

=INDEX(A1:A100,MATCH(B1,A1:A100,-1))

--
Regards
Frank Kabel
Frankfurt, Germany

I have an quation that gives me a number for the size of a steel rod.
The steel rods we use are only certain sizes so not just any size

will
do. The rod size I get in this equation I would like it to look at a
list of the correct rod sizes and round up to the next size on the
list we use.

NOTE: The sizes we use are not uniform so there is NOT an equal
distance between rod sizes.

Thank you
Jason


---
Message posted from http://www.ExcelForum.com/


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Round to numbers in a list

How do I do this if it is in ASENDAIANG order?


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Round to numbers in a list

Hi
think you mean ascending? Two ways:
1. Resort the list :-)
2. A little bit kludgy but give it a try

=IF(ISNA(MATCH(B1,A1:A100,0)),INDEX(A1:A100,MATCH( B1;A1:A100,1)+1),INDE
X(A1:A100,MATCH(B1,A1:A100,0)))



--
Regards
Frank Kabel
Frankfurt, Germany

How do I do this if it is in ASENDAIANG order?


---
Message posted from http://www.ExcelForum.com/


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 numbers in the millions to numbers in the thousands Little Red Excel Worksheet Functions 2 June 26th 08 08:51 PM
Round numbers up or down and always end in an 8 jpizel Excel Worksheet Functions 3 March 8th 08 03:38 PM
I am trying to round a list of numbers (prices) to xx.95. Is the Comexe35 Excel Worksheet Functions 3 February 3rd 06 01:49 PM
How to Round Whole Numbers? blank Excel Discussion (Misc queries) 3 May 18th 05 09:32 AM
Can you round numbers to display a specific set of numbers, for e. lbfries Excel Discussion (Misc queries) 3 April 20th 05 09:52 PM


All times are GMT +1. The time now is 01:21 AM.

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"