Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jezzica85
 
Posts: n/a
Default Cell reference of values

Hi all,
I know there's a way to find the maximum and minimum values in a range of
cells, but is there a way to return the cell references those values occupy
instead of the actual values, and ignoring zeros/blank cells in the minimum?
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Cell reference of values

=ADDRESS(MATCH(MAX(F4:F16),F4:F16,0)+ROW(F4)-1,COLUMN(F4:F16))

and

=ADDRESS(MATCH(MIN(IF(F4:F16<0,F4:F16)),F4:F16,0) +ROW(F4)-1,COLUMN(F4:F16))

the second formula is an array formula, it should be committed with
Ctrl-Shift-Enter, not just Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jezzica85" wrote in message
...
Hi all,
I know there's a way to find the maximum and minimum values in a range of
cells, but is there a way to return the cell references those values

occupy
instead of the actual values, and ignoring zeros/blank cells in the

minimum?
Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
jezzica85
 
Posts: n/a
Default Cell reference of values

Thanks Bob, but those formulas didn't work for me for some reason. I have
data in three columns that I want to find the cumulative max and min for
(B2:D33) and return those addresses, could that be why?

"Bob Phillips" wrote:

=ADDRESS(MATCH(MAX(F4:F16),F4:F16,0)+ROW(F4)-1,COLUMN(F4:F16))

and

=ADDRESS(MATCH(MIN(IF(F4:F16<0,F4:F16)),F4:F16,0) +ROW(F4)-1,COLUMN(F4:F16))

the second formula is an array formula, it should be committed with
Ctrl-Shift-Enter, not just Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jezzica85" wrote in message
...
Hi all,
I know there's a way to find the maximum and minimum values in a range of
cells, but is there a way to return the cell references those values

occupy
instead of the actual values, and ignoring zeros/blank cells in the

minimum?
Thanks!




  #4   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Cell reference of values

OK, first the formula that is working:

Placing, say, =MAX(B2:D33) in $H$7, the following formula will return
the address of the maximum element:

=ADDRESS(ROW(B2)+INT((SUMPRODUCT(--(N(OFFSET(B2,INT((ROW(1:96)-1)/3),MOD((ROW(1:96)-1),3)))=$H$7),ROW(1:96))-1)/3),COLUMN(B2)+MOD(SUMPRODUCT(--(N(OFFSET(B2,INT((ROW(1:96)-1)/3),MOD((ROW(1:96)-1),3)))=$H$7),ROW(1:96))-1,3))

It is semiparametric.
- Replace B2 with the first cell of your values.
- Replace 3 with the number of columns.
- Replace 96 with the number of total data (he 3*32)

Note: this is a rather imperfect formula. It will not work if more than
one elements in the data have the MAX value. But it has been tested
against a table of random data with the same dimensions, with values
guaranteed to be inside the data.


Bob, are you still reading this thread? My first approach was to find
the row in which MAX is appearing and similarly the column in which MAX
is appearing and use the two values in the Row and Column args of
ADDRESS. Yet, the first attempt with OFFSET was disappointing (half
expectedly, but I don't understand why yet). The "equivalent" formula
using INDIRECT instead,

=SUMPRODUCT(--ISNUMBER(MATCH($H$7,N(INDIRECT("b"&ROW(2:33)&":d"& ROW(2:33))),0))*ROW(1:32))

produces 0, which it should not. Which dark aspect of ref returning
functions have we reached here?

Regards,

Kostis

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
How to have a variable cell reference across sheets? Shane Gibson Excel Discussion (Misc queries) 3 March 8th 06 10:10 PM
indirect function to reference cell on different sheet Dolemite Excel Worksheet Functions 2 August 19th 05 05:25 PM
how do I format a cell reference to move as source changes KGray Excel Worksheet Functions 1 August 13th 05 12:41 AM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 10:13 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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