+ Reply to Thread
Results 1 to 6 of 6

Find max and minimum values in a section of a column, then do the same in next section.

  1. #1
    Registered User
    Join Date
    03-23-2020
    Location
    Arizona, United States
    MS-Off Ver
    2016
    Posts
    3

    Find max and minimum values in a section of a column, then do the same in next section.

    I currently have a long list of time stamps in one column that looks like this:[ATTACH]668722

    The column is divided in sections of varying length divided by a space.

    I am trying to write a program that finds the min and the max (the earliest and latest time) value in each section and then copies those values to another column before moving on to the next section.

    Any ideas and help would be appreciated.

    A portion of the column is attached.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Tscott98; 03-23-2020 at 06:57 PM.

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find max and minimum values in a section of a column, then do the same in next section

    Hi

    You can solve that without VBA.
    Suppose your data in M2:M25
    Use two columns P and Q (for example) as auxiliary columns. P records the start row of each group and Q the row where it ends
    In P2 use and drag down the following formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In Q2 use and drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To get the maximum use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To get the minimum use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See the file for clarification.
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Find max and minimum values in a section of a column, then do the same in next section

    VBA
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-23-2020
    Location
    Arizona, United States
    MS-Off Ver
    2016
    Posts
    3

    Re: Find max and minimum values in a section of a column, then do the same in next section

    That did it, thanks!

  5. #5
    Registered User
    Join Date
    03-23-2020
    Location
    Arizona, United States
    MS-Off Ver
    2016
    Posts
    3

    Re: Find max and minimum values in a section of a column, then do the same in next section

    Quote Originally Posted by jindon View Post
    VBA
    Please Login or Register  to view this content.
    That did it, thanks!

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Find max and minimum values in a section of a column, then do the same in next section

    You are welcome and thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as 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. *** Copy sub section total value to main section***
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2016, 03:14 AM
  2. [SOLVED] sort a section if cells in section contains certain values
    By vitaudi in forum Excel General
    Replies: 9
    Last Post: 10-08-2014, 03:15 AM
  3. Hide a section based on the click of a box in the beginning of the section
    By schmidt1962 in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2014, 04:51 PM
  4. Replies: 1
    Last Post: 06-16-2013, 07:36 AM
  5. Deleting Row Section without Disrupting Formula Range Outside of Deleted Section
    By JeffNYG23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2013, 09:10 AM
  6. Moving section headings from below section to above section..
    By Fayebaline in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-24-2011, 06:58 AM
  7. move that Row From the Waiting section to the completed section automaticly
    By jjsaw5 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-21-2007, 06:50 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