Question on Excel

I have an excel sheet with the following data (see below; this is just a small fragment; in the real sheet there are thousands of entries). Each different 'id' occupies several rows (the number varies). I need to be able to calculate somehow the highest number of 'months' for each distinct 'id'. How can I automate this? Thanks!

id code country months
200 PG25 NL 139
200 PG25 FR 140
5202 PG25 NL 104
5202 PG25 SE 104
5202 PG25 CH 104
5202 PG25 BE 104
5202 PG25 AT 104
333 PG25 IT 104
333 PG25 LI 132
333 PG25 DK 133
333 PG25 DE 139

PIVOT it. Select entire

PIVOT it.

Select entire table,
INSERT>PivotTable>Select a table or range

Then, Choose fields to add to report.