• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need Help Max() in Table

prasaddn

Active Member
Hi All,
I am struck at a strange problem.
I have dates in multiple columns, and use the max() function to get the maximum date from those multiple columns. This works fine when the data is in range.

As the data now is formatted as Table, I need help on how to use Max() with column names as parameters.

example:
Data in normal range in Excel
date1date2date3date4max dateFormula Used
09-02-2023​
10-02-2023​
13-02-2023​
11-02-2023​
13-02-2023​
=MAX(F10:I10)
13-02-2023​
14-02-2023​
17-02-2023​
15-02-2023​
17-02-2023​
=MAX(F11:I11)

Data formatted as Table in Excel
date1date2date3date4max dateformula used
09-02-2023​
10-02-2023​
13-02-2023​
11-02-2023​
17-02-2023​
=MAX([date1],[date2],[date3],[date4])
13-02-2023​
14-02-2023​
17-02-2023​
15-02-2023​
17-02-2023​
=MAX([date1],[date2],[date3],[date4])

in the first row, you will see that the =MAX([date1],[date2],[date3],[date4]) is giving 17-02-2023, instead of 13-02-2023!

please guide.
I have also attached excel file for your reference.

Regards,
Prasad DN
 

Attachments

  • Range Vs Table.xlsx
    11.5 KB · Views: 5
Your structured references are to entire table columns rather than the particular value within the current record. The form of data reference you require is
= MAX([@date1], [@date2], [@date3], [@date4])
 

Attachments

  • Range Vs Table.xlsx
    11.5 KB · Views: 4
Back
Top