+ Reply to Thread
Results 1 to 3 of 3

Calculating max range when formula is in the cells

  1. #1
    Forum Contributor
    Join Date
    09-15-2012
    Location
    Jamaica
    MS-Off Ver
    Microsoft 365
    Posts
    244

    Calculating max range when formula is in the cells

    Hello

    I am trying to find the highest value in range "d6:d13, the problem is when ever i run the code below it works perfectly on cells that doesnt have a formula, once the cell has a formula, the mx result returns as zero. I am a bit confused as to why, is it that the code is not seeing the value in the cell as a number, but as a formula, hence the resason its not calculating it?

    I would like the result to show in range "a1", with the active row offset to column "c". Please help if possible


    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Calculating max range when formula is in the cells

    That code returns the max of the range on the ActiveSheet. Might you be on the wrong sheet?
    Are D6:D13 fractional values, and the conversion to data type Long results in the 0?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    09-15-2012
    Location
    Jamaica
    MS-Off Ver
    Microsoft 365
    Posts
    244

    Re: Calculating max range when formula is in the cells

    Thank you for helping regarding the max value. I acknowledged what you said regarding the active sheet. I made the sheet active prior to that section of the code executing and it worked, thank you.

    How can i do the other part of the question regarding displaying the value of the highest value active row offset by one column?

    So in other words, if in the range "d6:d13" the highest value is in cell "d8", then i would like to display the contents in range "C8 and d8"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Calculating Time Range of cells less than 1 hour
    By Bil4646l in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-22-2013, 09:23 PM
  2. Replies: 7
    Last Post: 01-31-2011, 06:26 AM
  3. Calculating Moving Range with Blank Cells
    By montego in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-16-2010, 11:20 AM
  4. Processing/Calculating Range Of Cells
    By EdAROC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2008, 09:37 AM
  5. Replies: 2
    Last Post: 06-02-2007, 10:23 AM

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