PC Review


Reply
Thread Tools Rate Thread

How can I use numbers to define range for Max() ?

 
 
excel12345
Guest
Posts: n/a
 
      27th Feb 2006

I know the absolute offsets of the rows and columns in a seperate shee
and want to get the max of that range. For example:
=Max(CC, RR, cc, rr)

where all the parameters are numbers allowing me to define the range

--
excel1234
-----------------------------------------------------------------------
excel12345's Profile: http://www.excelforum.com/member.php...fo&userid=3197
View this thread: http://www.excelforum.com/showthread.php?threadid=51701

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      27th Feb 2006
Try:


Function mxinr(c1 As Long, r1 As Long, c2 As Long, r2 As Long) As Double
Dim r, rr As Range
Dim v As Double
Set r = Range(Cells(r1, c1), Cells(r2, c2))
v = Cells(r1, c1).Value
For Each rr In r
If rr.Value > v Then
v = rr.Value
End If
Next
mxinr = v
End Function

--
Gary''s Student


"excel12345" wrote:

>
> I know the absolute offsets of the rows and columns in a seperate sheet
> and want to get the max of that range. For example:
> =Max(CC, RR, cc, rr)
>
> where all the parameters are numbers allowing me to define the range.
>
>
> --
> excel12345
> ------------------------------------------------------------------------
> excel12345's Profile: http://www.excelforum.com/member.php...o&userid=31975
> View this thread: http://www.excelforum.com/showthread...hreadid=517016
>
>

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      27th Feb 2006
Check out the OFFSET() function in XL Help.


In article <(E-Mail Removed)>,
excel12345 <(E-Mail Removed)>
wrote:

> I know the absolute offsets of the rows and columns in a seperate sheet
> and want to get the max of that range. For example:
> =Max(CC, RR, cc, rr)
>
> where all the parameters are numbers allowing me to define the range.

 
Reply With Quote
 
Ardus Petus
Guest
Posts: n/a
 
      27th Feb 2006
=MAX(INDIRECT("Sheet2!"&ADDRESS(rrf,ccf)&"":""&ADDRESS(rrl,ccl)))

HTH
--
AP

"excel12345" <(E-Mail Removed)> a
écrit dans le message de
news:(E-Mail Removed)...
>
> I know the absolute offsets of the rows and columns in a seperate sheet
> and want to get the max of that range. For example:
> =Max(CC, RR, cc, rr)
>
> where all the parameters are numbers allowing me to define the range.
>
>
> --
> excel12345
> ------------------------------------------------------------------------
> excel12345's Profile:

http://www.excelforum.com/member.php...o&userid=31975
> View this thread: http://www.excelforum.com/showthread...hreadid=517016
>



 
Reply With Quote
 
excel12345
Guest
Posts: n/a
 
      1st Mar 2006

Thanks to all of you for your help - I actually used a bit from each of
you and solved the problem and learned some valuable information at the
same time. Your time and effort in helping me is much appreciated.


--
excel12345
------------------------------------------------------------------------
excel12345's Profile: http://www.excelforum.com/member.php...o&userid=31975
View this thread: http://www.excelforum.com/showthread...hreadid=517016

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
define a range that equals the first row of another range Richard Microsoft Excel Programming 5 1st Dec 2010 05:53 AM
Define a Range based on a Range object Terry Microsoft Excel Programming 4 25th Oct 2010 08:44 PM
how to define a range in VBA Negda Microsoft Excel Programming 1 19th Jul 2007 01:22 PM
two columns range of numbers need to list all numbers in the range =?Utf-8?B?YXJzb3ZhdA==?= Microsoft Excel New Users 2 30th Oct 2006 08:21 PM
Define a range based on another named range =?Utf-8?B?QmFzaWw=?= Microsoft Excel Worksheet Functions 2 21st Feb 2005 01:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:46 PM.