+ Reply to Thread
Results 1 to 6 of 6

Finding MIN in a column with dynamic range

  1. #1
    Registered User
    Join Date
    04-21-2020
    Location
    Warsaw
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Finding MIN in a column with dynamic range

    I want to find MIN in a column, within a range which always begins at precise cell, but ends dynamically, depending on the length of another column (R)

    So it would be:

    MIN(E35:E122) if last value in column R is in R122.

    Or

    MIN(E35:E900) if last value in column R is in R900.

    And so on.

    P.S. In column R values between 1 and 35 should be ignored. They can be empty as well. So only R35+ matter.
    P.S.2 I asked another question about dynamic range, and it was solved, but I cannot figure out how to use that answer here

    I'd be grateful for all help.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Finding MIN in a column with dynamic range

    Here is a VBA solution for you

    Please Login or Register  to view this content.
    How to install your new code
    • Copy the Excel VBA code
    • Select the workbook in which you want to store the Excel VBA code
    • Press Alt+F11 to open the Visual Basic Editor
    • Choose Insert > Module
    • Edit > Paste the macro into the module that appeared
    • Close the VBEditor
    • Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    To run the Excel VBA code:
    • Press Alt-F8 to open the macro list
    • Select a macro in the list
    • Click the Run button
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-21-2020
    Location
    Warsaw
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Re: Finding MIN in a column with dynamic range

    Quote Originally Posted by alansidman View Post
    Here is a VBA solution for you
    Thanks, but I'd like to avoid VBA for this. I'm pretty sure this is quite simple one-line formula, I just don't know the syntax.

    That previous question I mentioned resulted with this solution: =LOOKUP(2;1/(R:R<>"");E:E)

    So like I said - I think this would be something similar, but I cannot figure it out...

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Finding MIN in a column with dynamic range

    This one is not elegant, but should do the job:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    replace coma with semicolon if you use it as a separator in formulas. Or if you use Polish version, the formula would read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    PS. You have noted the comment in your previous thread, so why you haven't posted the attachment this time?
    I'd put here the extended version of the suggestion:
    Please read the yellow banner at the top of the page. Or skip to extended version of it below:

    Will you please attach a SMALL sample Excel workbook(s) (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. (If there are typical cases like: all unique values/duplicates could occur, day/night, nobody present/several persons at once, before/on/past due, empty cells between data, mixed text/numbers, etc. - please show them all, or at least indicate in text). The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution(s) is/are also shown (mock up the results manually).

    3. Make sure that all confidential/restricted information (either personal or business) like real e-mails, social security numbers, bank accounts, etc. is removed first!!

    To attach an Excel file you have to do the following (paperclip icon does not work!): Just before posting, scroll down and press Go Advanced button and then scroll down and press Manage Attachments link. Now follow the instructions at the top of that pop-up screen.
    Best Regards,

    Kaper

  5. #5
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Finding MIN in a column with dynamic range

    based on #4 but not volatile
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    And i prefer to use range R1:Rxxxx

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: Finding MIN in a column with dynamic range

    Please Login or Register  to view this content.
    ?
    Last edited by protonLeah; 04-21-2020 at 04:34 PM.
    Ben Van Johnson

+ 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] SUMIF formula with dynamic column range and then expand the width of SUM range
    By gravythief in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-26-2017, 08:36 AM
  2. [SOLVED] Finding the (Dynamic) End of a Horizontal Range
    By Lemmy Kickit in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-12-2016, 06:52 PM
  3. Need to define dynamic range for column I to K based on dynamic column A
    By flabb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-19-2015, 10:19 AM
  4. Finding Last Three Values From Dynamic Table Range in Excel
    By s2jrchoi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-27-2015, 02:01 AM
  5. [SOLVED] Finding Min/Max for Dynamic Date Range
    By Swept in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-20-2013, 06:38 AM
  6. Dynamic Range Column Chart w/ Dynamic Avg Line (Excel 2007)
    By BrokenBiker in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-04-2012, 11:40 AM
  7. [SOLVED] Finding dynamic range
    By hardik.r.shah in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2012, 01:30 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