Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: high & low relational numbers

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    237
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Using the followiing SUMIF and COUNTIF functions I am able to get the # of occurences and the avg in relation to specific cells. How can I get largest and the smallest number in the same range?

    dblVal = Application.SumIf(rngC, rng, rngD) ' - Application.SumIf(rngC, rng, rngB)
    dblCnt = Application.CountIf(rngC, rng)
    dblAvg = dblVal / dblCnt
    MsgBox dblAvg

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    max and min?

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Posts
    237
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    could you me an example using my scenario?
    TIA

  4. #4
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I don't know, depending on what range you want:

    Application.WorksheetFunction.Max (rngD)

    Application.WorksheetFunction.Min (rngD)
    Best regards,
    Allan Chara
    http://www.mrspreadsheets.com

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Posts
    237
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thats just it. The range is dependent on the results of the COUNTIF function. Thus my problem.

  6. #6
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am getting lost in your variable named ranges. Can you give the actual cell ranges?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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