Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default Nearest one or two or three numbers in a row of data

On Sat, 16 Jun 2012 11:42:24 +0000, tikrit wrote:


Hi Everyone,

I have a problem today. I tried in different ways but could not solve
it.

Lest's say I have the following row of Data:

61 49 55 45 48 69 79 51

I need a code (Excel formula) that find the closest two or three numbers
to 50 but lower than 50 (which in this case are 49 48 and 45)

I will then add them to each other and put the result in a single cell

Notes : the data must be in Row. Mine is Excel 2010.

Thanks in Advance for your help


This formula must be **array-entered**:

=SUM(LARGE(IF(Rng<=50,Rng),{1,2,3}))

Rng Refers To the cells containing your values.
----------------------------------------

To **array-enter** a formula, after entering
the formula into the cell or formula bar, hold down
<ctrl<shift while hitting <enter. If you did this
correctly, Excel will place braces {...} around the formula.
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 to get to the nearest 0.09 KB Excel Worksheet Functions 7 November 23rd 09 10:26 PM
how do I convert numbers to the nearest 1000 Brian Excel Discussion (Misc queries) 2 February 8th 06 12:36 AM
Rounding numbers to the nearest 5 or 0 Fieldmedic Excel Worksheet Functions 3 July 17th 05 06:51 AM
round numbers to the nearest quarter? LeelooIvy Excel Worksheet Functions 3 May 14th 05 07:34 PM
Rounding numbers to the nearest thousand Mark Excel Discussion (Misc queries) 2 March 10th 05 12:13 PM


All times are GMT +1. The time now is 12:39 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"