Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Returning an address from an array

I am trying to return the address in an array for a value within that array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum the
numbers from B2 to B4.

Help!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Returning an address from an array

Consider VLOKUP():


=VLOOKUP(DATE(2007,5,12),A1:B5,2)
will yield 12 - the matching value in column B for 5/12
--
Gary''s Student - gsnu200718


"wienmichael" wrote:

I am trying to return the address in an array for a value within that array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum the
numbers from B2 to B4.

Help!!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Returning an address from an array

I want it to do the same thing as Vlookup, but instead of returning the value
12, I want it to return the address "B3".


"Gary''s Student" wrote:

Consider VLOKUP():


=VLOOKUP(DATE(2007,5,12),A1:B5,2)
will yield 12 - the matching value in column B for 5/12
--
Gary''s Student - gsnu200718


"wienmichael" wrote:

I am trying to return the address in an array for a value within that array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum the
numbers from B2 to B4.

Help!!!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Returning an address from an array

I would like it to perform the same function as VLookup, but instead of
returning the value (12) in the cell B3, I want it to return the address B3.

"Gary''s Student" wrote:

Consider VLOKUP():


=VLOOKUP(DATE(2007,5,12),A1:B5,2)
will yield 12 - the matching value in column B for 5/12
--
Gary''s Student - gsnu200718


"wienmichael" wrote:

I am trying to return the address in an array for a value within that array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum the
numbers from B2 to B4.

Help!!!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Returning an address from an array

=ADDRESS(MATCH(DATE(2007,5,12),A1:A5),2)

--
Gary''s Student - gsnu200718


"wienmichael" wrote:

I would like it to perform the same function as VLookup, but instead of
returning the value (12) in the cell B3, I want it to return the address B3.

"Gary''s Student" wrote:

Consider VLOKUP():


=VLOOKUP(DATE(2007,5,12),A1:B5,2)
will yield 12 - the matching value in column B for 5/12
--
Gary''s Student - gsnu200718


"wienmichael" wrote:

I am trying to return the address in an array for a value within that array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum the
numbers from B2 to B4.

Help!!!



  #6   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Returning an address from an array

How do you determine the ending cell in the range you want to sum?

Maybe you could use something like:

=SUM(INDEX(B1:B5,MATCH(DATE(2007,5,12),A1:A5,0)):I NDEX(B1:B5,MATCH(DATE(2007,5,14),A1:A5,0)))

If the ending cell is always 2 below the first cell, maybe

=SUM(OFFSET(B1,MATCH(DATE(2007,5,12),A1:A5,0)-1,0,3,1))


"wienmichael" wrote:

I am trying to return the address in an array for a value within that array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum the
numbers from B2 to B4.

Help!!!

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Returning an address from an array

Based on your explanation you want to sum 3 cells.

E1 = 5/12/2007

=SUM(OFFSET(B1,MATCH(E1,A1:A5,0)-1,,3))

Will sum B3:B5

The 3 in the formula is how many cells you want to sum.

Note that if you entered 5/14/2007 in cell E1 there is not any data below
5/14/2007 in your sample so the result would be 15, the sum of B5:B7.

Biff

"wienmichael" wrote in message
...
I am trying to return the address in an array for a value within that
array.

Example

A B
1 5/10 7
2 5/11 10
3 5/12 12
4 5/13 9
5 5/14 15

I would like to return the address A3 when I look up the date 5/12 in the
array. Ultimately, I would like to manipulate the data in column B
corresponding to the row returned from looking up 5/12. For instance, I
would like to sum the numbers from B3 to B5. Or if I look up 5/11 to sum
the
numbers from B2 to B4.

Help!!!



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
returning the address of a value Excel Enthusiastic Excel Discussion (Misc queries) 1 April 11th 07 06:40 PM
=(INDIRECT(ADDRESS(ROW(),#))) with SUMPRODUCT returning #VALUE! Brian Williams Excel Worksheet Functions 7 March 30th 07 03:28 PM
Returning an array from the INDEX function Agenor Excel Worksheet Functions 2 November 28th 06 01:44 AM
Returning Multiple Text or Address Locations jdurrmsu Excel Worksheet Functions 3 February 3rd 06 07:34 AM
Array formula returning wrong results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 19th 05 11:29 AM


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