+ Reply to Thread
Results 1 to 5 of 5

Obtaining min and max

  1. #1
    Ed
    Guest

    Obtaining min and max

    What are the codes to obtain the min and the max in a rage say
    Range("B4:B8")? Any help would be appreciated,

    Tganks,


    Ed

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    =WORKSHEETFUNCTION.MIN(RANGE("B4:B8"))
    =WORKSHEETFUNCTION.MAX(RANGE("B4:B8"))

    Quote Originally Posted by Ed
    What are the codes to obtain the min and the max in a rage say
    Range("B4:B8")? Any help would be appreciated,

    Tganks,


    Ed
    Last edited by Excelenator; 08-03-2006 at 10:03 AM.
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    moon
    Guest

    Re: Obtaining min and max

    =min(B4:B8)
    =max(B4:B8)


    "Ed" <[email protected]> schreef in bericht
    news:[email protected]...
    > What are the codes to obtain the min and the max in a rage say
    > Range("B4:B8")? Any help would be appreciated,
    >
    > Tganks,
    >
    >
    > Ed




  4. #4
    Ed
    Guest

    Re: Obtaining min and max

    When I tried to assign the min of a range in a macro to the variable l
    using:

    l = Min("D4:D7")

    I get the message:

    Compile error
    Sub or function not defined


    How can I get it to work?

    Thanks

    Ed



    I used the code l = Min("D4:D7") in a macro to assign the min of a
    range




    On Thu, 3 Aug 2006 15:51:12 +0200, "moon" <[email protected]>
    wrote:

    >=min(B4:B8)
    >=max(B4:B8)
    >
    >
    >"Ed" <[email protected]> schreef in bericht
    >news:[email protected]...
    >> What are the codes to obtain the min and the max in a rage say
    >> Range("B4:B8")? Any help would be appreciated,
    >>
    >> Tganks,
    >>
    >>
    >> Ed

    >


  5. #5
    Ed
    Guest

    Re: Obtaining min and max

    Thanks to all. Still having difficulty. Posting new message



    On Thu, 03 Aug 2006 08:43:10 -0500, Ed <[email protected]> wrote:

    >What are the codes to obtain the min and the max in a rage say
    >Range("B4:B8")? Any help would be appreciated,
    >
    >Tganks,
    >
    >
    >Ed


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1