+ Reply to Thread
Results 1 to 12 of 12

How to extract specific hourly rows based on the maximum daily value in a column

  1. #1
    Registered User
    Join Date
    03-21-2020
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    5

    How to extract specific hourly rows based on the maximum daily value in a column

    Hi,
    Very often I have to face a similar scenario described below:
    a table with days and hours and then all the values in the next columns from which I need to extract only some rows... precisely, those ones with the maximum value in a column. In other words, the outcome is composed of one row per day that represent the hour with the maximum value of a specific column... and of course that selected row has all the corresponding values for that hour.

    I found a way to cope this scenario but I have to implement two pivot tables and a couple of functions (CONCATENATE and VLOOKUP). I am curious to know how you resolve this problem and if someone of you has a smarter or faster or easiers solution to resolve that scenario. I attach the Excel file with my solution and some comments as well.

    Thank you for your attention.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    Hi auato and welcome to the forum,

    Here is the formula that will replace your "X" and two Pivot Tables.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See it in the attached file below.
    Index Match from Maxif Table.xlsx
    Wash you hands and don't touch you face from Seattle.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    I don't think MAXIFS was available in XL 2016?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    I guess the OP needs to test it
    https://corporatefinanceinstitute.co...tion-in-excel/
    claims it was I also find that lots of people upgrade their versions and don't update their profile. So what they show they have and what they really have are different. You might be right . I hope auato gets back to us and says if it works or not.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    I also find that lots of people upgrade their versions and don't update their profile
    When I see an old member with a 2003 version in his profile, I post a request to adapt.(which works 99% of the time)
    Further than that, we can't ask everyone to double-check.
    That " canned reply" also includes a sentence " ...members tailor their answer to your version.."......

  6. #6
    Registered User
    Join Date
    03-21-2020
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    5

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    Thanks Marvin!
    Yes, Pepe Le Mokko is right (thank you Pepe) MAXIFS doesn't exist in my Excel 2016.
    But, as I was too curious about your solution I tried it on another laptop of a friend of mine... and, yes it works perfectly!
    Unfortunately my company still adopts the old Office2016.
    Last edited by auato; 03-23-2020 at 05:57 AM.

  7. #7
    Registered User
    Join Date
    03-21-2020
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    5

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    OK, a workaround could be:
    Please Login or Register  to view this content.
    But I forgot to explain a strange point.... when I open my Excel 2016, even though MAXIFS is not recognized, I noticed that your formula worked fine filling correctly the cells... and when I look into the cell I can see that unknown part in blue:
    Please Login or Register  to view this content.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    Hi auato,

    Thanks for the feedback. I'm not an expert on what functions are/were in which version of Excel I have no idea why MaxIfS should work in older versions or why your blue above is there. I hope this problem is solved, or do you want more work on it? There is a Control+Shift+Enter (CSE) solution (these are called Array Formulas) for your old versions if you still need it. See:
    https://www.excelforum.com/excel-for...xcel-help.html
    It looks like I've been schooled on this topic before and I even asked the question.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    AFAIK the "xlfn" string indicates that the function following it is not native to the XL version in use.
    BTA, if it works, who cares?
    The non array alternatives would imply using AGGREGATE or SUMPRODUCT the latter being rather cumbersome in this case.

    Se va bene per Lei, anche per noi !

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    Hey Pepe,

    This site claims
    which is not supported in versions of Excel earlier than Excel 2007.
    https://support.office.com/en-us/art...4-9FBB77FD5025

    Here is another interesting result when the client copy won't work but opening it using OneDrive does?
    https://answers.microsoft.com/en-us/...b-94478ab72f50

  11. #11
    Registered User
    Join Date
    03-21-2020
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    5

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    Perfect, Marvin & Pepe, per me va bene, anzi benissimo :-)
    Thank you very much for your precious support. I have enriched my skills on Excel with MAXIFS or the was MAX(IF) and AGGREGATE.... further these also enreached myself with CSE for Array Formuals which I am already using a lot .... and learned another trick to handle those type of tables I depicted above. Thank you very much guys! Really appreciated your generosity. See you next time

  12. #12
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to extract specific hourly rows based on the maximum daily value in a column

    Hey auato,

    Thanks for the nice words. It is always nice to know people are learning from what we suggest.

    Could you edit the very first post and change the Prefix to "Solved". That way we feel confident you got a good answer. It also allows us to help others without opening this thread again to see if you need more help. Also, if you find an answer especially good you can click on the "Add Reputation Star" below the answer, as that is this site's method to track better answers.

+ 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. Extract rows to another sheet based on specific words + auto updates
    By scooter2012 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2022, 09:17 PM
  2. [SOLVED] Extract specific numbers in a column and do various summations based on their position
    By lamlam28 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-13-2019, 09:35 AM
  3. Replies: 4
    Last Post: 11-19-2019, 01:13 AM
  4. Extract specific rows based on cell
    By ili_Sophia in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2018, 05:52 AM
  5. Replies: 3
    Last Post: 05-11-2016, 04:04 PM
  6. [SOLVED] Find Daily Maximum from Hourly Data
    By computing in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2013, 02:29 PM
  7. Extract rows with specific text in a column
    By TroyB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2005, 01:06 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