+ Reply to Thread
Results 1 to 11 of 11

Find Max value horizontally and vertically in table

  1. #1
    Registered User
    Join Date
    03-22-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    40

    Find Max value horizontally and vertically in table

    Hi!

    I have a table with dates on the first column and cities spread over the rows.
    Now I would like to search on the row of most recent date for the max value (aka city with most clicks). In this case it should return 7 (Amsterdam on 9/17/17). Any ideas??
    Thanks!
    Capture3.JPG


    Date New York Amsterdam Rome
    9/9/17 2 2 4
    9/10/17 3 4 6
    9/11/17 5 6 2
    9/12/17 6 7 2
    9/13/17 7 4 4
    9/14/17 3 3 5
    9/15/17 2 4 6
    9/16/17 5 7 3
    9/17/17 4 7 2
    Last edited by SHI.NL; 04-17-2018 at 07:50 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Find Max value horizontally and vertically in table

    Try this:

    =MAX(INDEX(B:D,MATCH(MAX(A:A),A:A,0),))

    You might need to use semicolons ( ; ) instead of commas ( , ) in the formula.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Find Max value horizontally and vertically in table

    or this

    =MAX(INDIRECT("B"&MATCH(MAX(A:A),A:A,0)&":D"&MATCH(MAX(A:A),A:A,0)))
    Attached Files Attached Files
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Find Max value horizontally and vertically in table

    try
    =MAX(INDEX(B:D,MATCH(99^99,A:A),))
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Find Max value horizontally and vertically in table

    or
    =MAX(INDEX(B:D,MATCH(MAX(A:A),A:A,0),))

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Find Max value horizontally and vertically in table

    nflsales suggested:
    =MAX(INDEX(B:D,MATCH(99^99,A:A),))
    which uses NON-EXACT match to find the last entry in column A
    - this solution requires dates to be in ascending order
    Last edited by kev_; 04-17-2018 at 08:26 AM.

  7. #7
    Registered User
    Join Date
    03-22-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    40

    Re: Find Max value horizontally and vertically in table

    Great! Thanks a lot! Works like a charm.
    One more though, how do I add the corresponding city now?

  8. #8
    Registered User
    Join Date
    03-22-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    40

    Re: Find Max value horizontally and vertically in table

    Quote Originally Posted by Pete_UK View Post
    Try this:

    =MAX(INDEX(B:D,MATCH(MAX(A:A),A:A,0),))

    You might need to use semicolons ( ; ) instead of commas ( , ) in the formula.

    Hope this helps.

    Pete

    Great! Thanks a lot! Pete_UK ! Works like a charm.
    One more though, how do I add the corresponding city now?

  9. #9
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Find Max value horizontally and vertically in table

    City =INDEX($B$1:$D$1,MATCH(MAX(INDEX(B:D,MATCH(MAX(A:A),A:A,0),)),INDEX(B:D,MATCH(MAX(A:A),A:A,0),),0))

  10. #10
    Registered User
    Join Date
    03-22-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    40

    Re: Find Max value horizontally and vertically in table

    Quote Originally Posted by Phuocam View Post
    City =INDEX($B$1:$D$1,MATCH(MAX(INDEX(B:D,MATCH(MAX(A:A),A:A,0),)),INDEX(B:D,MATCH(MAX(A:A),A:A,0),),0))
    Thank you !!!!! Awesome !!!!

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Find Max value horizontally and vertically in table

    Glad you got a solution to your follow-on question, and thanks for the rep earlier.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post and mark this thread as SOLVED.

    Pete

+ 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. Excel function that filters table horizontally and vertically
    By wwcd11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2018, 08:16 PM
  2. [SOLVED] Lookup Horizontally & Vertically
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2014, 12:07 PM
  3. Replies: 7
    Last Post: 04-18-2014, 12:29 PM
  4. Can you autofill horizontally and vertically?
    By keez1993 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2014, 03:59 AM
  5. [SOLVED] Is it possible to freeze both vertically and horizontally?
    By claralou in forum Excel General
    Replies: 4
    Last Post: 09-27-2013, 05:04 AM
  6. [SOLVED] Sumproduct vertically and horizontally
    By jimstrongy in forum Excel General
    Replies: 2
    Last Post: 03-21-2012, 04:37 PM
  7. Searching a table vertically and Horizontally
    By smokeydawson555 in forum Excel General
    Replies: 3
    Last Post: 06-29-2009, 11:55 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