+ Reply to Thread
Results 1 to 4 of 4

Using "Application.WorksheetFunction.max"

  1. #1
    Registered User
    Join Date
    01-30-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2016
    Posts
    46

    Question Using "Application.WorksheetFunction.max"

    Hello everyone.

    At some point in my code I'm using something like this:

    Please Login or Register  to view this content.
    I would like to set the interval between two cells, instead of each individual cell. Something like this:

    Please Login or Register  to view this content.
    That doesn't work, though. Which is the correct syntax?

    Thank you for your attention.
    Last edited by lucasar; 10-13-2015 at 02:18 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using "Application.WorksheetFunction.max"

    Try this.
    Please Login or Register  to view this content.
    Or this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Using "Application.WorksheetFunction.max"

    Hi lucasar,

    I think this might work.
    Please Login or Register  to view this content.
    Notes:
    1. Use Range(first Cell, last cell) to specify the range in VBA. See example above.
    2. I wouldn't recommended in this case using x as the result and also as part of calculations in this case;
    that's why I added another variable for the resulting max value.
    If this has been helpful, please click on the star at the left.

  4. #4
    Registered User
    Join Date
    01-30-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Using "Application.WorksheetFunction.max"

    Thank you guys, problem solved.

+ 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. Replies: 1
    Last Post: 05-23-2013, 02:04 PM
  2. [SOLVED] Excel VBA Runtime error '1004' "If WorksheetFunction.Find" function
    By miguelitoven in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2013, 04:34 PM
  3. Replies: 6
    Last Post: 01-04-2013, 11:36 AM
  4. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  5. error trying to use "Application.WorksheetFunction.Sum(CountIfs"....in vba
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2011, 09:15 PM
  6. Replies: 2
    Last Post: 07-07-2010, 01:10 PM
  7. "WinForm Application" to act as "Automation Server"
    By mduraidi in forum Excel General
    Replies: 0
    Last Post: 03-30-2006, 08:10 AM

Tags for this Thread

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