+ Reply to Thread
Results 1 to 2 of 2

Choose multiple maxima from table

  1. #1
    Registered User
    Join Date
    04-24-2014
    Location
    Pocatello, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    16

    Choose multiple maxima from table

    I am very new to VBA and not even sure where to begin for something like this.

    I have a table containing sales data for three-hour periods for a restaurant. The periods shown are not disjoint, e.g., the table contains 6:00-9:00 and 6:30-9:30. I want to find those points where sales are the highest in order to schedule additional help for those "peak" periods.

    I have a formula that determines how many employees can be scheduled each day, how many are used to do daily tasks (like open and close), and how many, n, are available for helping with "peak" periods.

    However, if I simply choose the n highest sales values, it will undoubtedly double-(and possible triple-)cover the same period, e.g., 10:30-13:30, 11:00-14:00, and 11:30-14:30 are frequently much higher than other times, but I would only need one or possibly two additional employees to meet the additional sales.

    Is there a way to choose maxima for disjoint time periods from this table?
    Last edited by jaromluker; 04-24-2014 at 02:51 PM.

  2. #2
    Registered User
    Join Date
    04-24-2014
    Location
    Pocatello, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Choose multiple maxima from table

    So I think the solution is to use WorksheetFunction.Large, and then run a While loop to require the nth largest number to be tied to a row that is at least 6 higher (or lower) than the previously selected maxima. This should use the Abs function, I believe.

+ 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. [SOLVED] Table salary is minimum and maxima does not exceed 6805.59
    By redza in forum Excel General
    Replies: 2
    Last Post: 08-05-2013, 08:33 PM
  2. [SOLVED] Formula help to choose lowest cost from multiple vendors and then choose vendor
    By roland_arv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-27-2013, 07:48 PM
  3. Locating multiple maxima within a data column
    By AlanDA66 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-13-2012, 12:33 AM
  4. computing annual maxima
    By chuck_p in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-06-2009, 11:47 AM
  5. Replies: 2
    Last Post: 09-12-2005, 03:05 PM

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