#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default in range?

(I hope the following is clear, but it's probably not)

Is it possible to construct a formula (I know I could do it in a macro,
but for various reasons, that's not practical in this case) to do the
following?

C1 = 123, D1 = 456, E1 = 1.234
C2 = 512, D2 = 999, E2 = 3.457

If A{n} is between C{x} and D{x} then B{n} = E{x}

{n} varies from 1 to perhaps 10,000. {x} varies from 1 to perhaps 10.

Thanks
Bruce

--
+-------------------+---------------------------------------------------+
Bruce Bowler | Dorothy Parker once described 'eternity' as a ham
1.207.633.9600 | and two people. - Erma Bombeck
|
+-------------------+---------------------------------------------------+
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default in range?

Hello Bruce,

Array-enter into B1:
=INDEX(E:E,MATCH(1,(A1=$C$1:$C$99)*(A1<=$D$1:$D$9 9),0))
and copy down.

Regards,
Bernd
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default in range?

On Tue, 05 May 2009 13:37:11 -0700, Bernd P wrote:

Hello Bruce,

Array-enter into B1:
=INDEX(E:E,MATCH(1,(A1=$C$1:$C$99)*(A1<=$D$1:$D$9 9),0)) and copy down.

Regards,
Bernd


That doesn't seem to work. I'm running 2003, is that a 2007 enhancement?

The part the "fails" is the A1=$C$1:$C$99 (and the <= case too), it
returns #value.

Having said that, it turns out that in my case

=INDEX(E:E,MATCH(A1,C:C,1))

does what I need, largely because the ranges in C and D will never
overlap (I know, 'never' is a dangerous statement :-)

Thanks for the pointer.
Bruce
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default in range?

Hello Bruce,

I tested in Excel 2002 and 2007. It works fine.

Are you sure that you "array-entered" my formula? - that is:
Entering with CTRL + SHIFT + ENTER, not just ENTER

Regards,
Bernd
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default in range?

On Wed, 06 May 2009 08:53:06 -0700, Bernd P wrote:

Hello Bruce,

I tested in Excel 2002 and 2007. It works fine.

Are you sure that you "array-entered" my formula? - that is: Entering
with CTRL + SHIFT + ENTER, not just ENTER

Regards,
Bernd


Ahhh... Missed that in your original post. Works fine now. Thanks!



--
+-------------------+---------------------------------------------------+
Bruce Bowler | GUI's normally make it simple to accomplish simple
1.207.633.9600 | actions and impossible to accomplish complex
| action. - Anonymous
+-------------------+---------------------------------------------------+
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
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


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