Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
excel12345
 
Posts: n/a
Default How can I use numbers to define range for Max() ?


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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default How can I use numbers to define range for Max() ?

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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default How can I use numbers to define range for Max() ?

Check out the OFFSET() function in XL Help.


In article ,
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.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default How can I use numbers to define range for Max() ?

=MAX(INDIRECT("Sheet2!"&ADDRESS(rrf,ccf)&"":""&ADD RESS(rrl,ccl)))

HTH
--
AP

"excel12345" a
écrit dans le message de
...

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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
excel12345
 
Posts: n/a
Default How can I use numbers to define range for Max() ?


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
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 do I get the maximum absolute value of a range of numbers? biscuitsmom Excel Discussion (Misc queries) 2 January 19th 06 07:55 PM
Searching a range of numbers for a specified total saustin Excel Worksheet Functions 2 January 19th 06 03:59 PM
How do I use a range of numbers in an if statement? pbeattie Excel Worksheet Functions 2 October 10th 05 10:36 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM


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