# finding max date within text within a range of cells

• ### Question

• Hello,

I am trying to develop a code for this scenario:

I have a range of cells, all containing chronological dates with text updates within each individual cell of that range.  i.e. cells N2:T2 contain text and date updates similar to this format: NAME, DATE (mm/dd/yyyy), TEXT... (repeat)

What I am trying to do is find the max date, or in other words, when the last update was made, from within this range of cells.

I would like to display the date in column X, and repeat this function throughout each row of the worksheet.  i.e. N3:T3, N4:T4, etc.

I have tried using similar lines of code when searching for help, however none seem to work!

Any help would be greatly appreciated.

Thursday, August 7, 2014 6:19 PM

• Hi,

>>i.e. cells N2:T2 contain text and date updates similar to this format: NAME, DATE (mm/dd/yyyy), TEXT... (repeat<<

Since you said there are name, date and text in the cells of Range("N2:T2"), if there is no number in the cells, I think MAX function can return the latest date as you want. You could use the formula as followed in the Cell X2 and then apply it to all cells in column X.

=MAX(N2:T2)

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Friday, August 8, 2014 9:41 AM
• If you are talking about a range of cells where the date is in a cell alone and you want the max date of a column then;

OR if the idea is to pick the highest date in a row of dates as Luna suggested above then;

If you need the max date no matter which row or column then you will always only get 1 value with formula =MAX(A1:G12) with the result of  7/15/2014. So you see that you can get results based on a range on the Column, the Row or the Block respectively.

Are any of these what you are looking for? or are you looking for VBA code that will program this in a spreadsheet for you?

Chris Ward

Friday, August 8, 2014 2:04 PM

### All replies

• Do you want to disseminate the date from the Column to a new column for all Rows? or just display the value?

Chris Ward

Thursday, August 7, 2014 7:56 PM
• Hi,

>>i.e. cells N2:T2 contain text and date updates similar to this format: NAME, DATE (mm/dd/yyyy), TEXT... (repeat<<

Since you said there are name, date and text in the cells of Range("N2:T2"), if there is no number in the cells, I think MAX function can return the latest date as you want. You could use the formula as followed in the Cell X2 and then apply it to all cells in column X.

=MAX(N2:T2)

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Friday, August 8, 2014 9:41 AM
• I just want to show the value of the max date, so I can quickly see when the last update was made.
Friday, August 8, 2014 1:44 PM
• If you are talking about a range of cells where the date is in a cell alone and you want the max date of a column then;

OR if the idea is to pick the highest date in a row of dates as Luna suggested above then;

If you need the max date no matter which row or column then you will always only get 1 value with formula =MAX(A1:G12) with the result of  7/15/2014. So you see that you can get results based on a range on the Column, the Row or the Block respectively.

Are any of these what you are looking for? or are you looking for VBA code that will program this in a spreadsheet for you?

Chris Ward

Friday, August 8, 2014 2:04 PM