Raysadude
The code you need is:
Sub Test2()
Dim varMax
Sheets("sheet1").Select
Range("B1").Select
varMax = Application.WorksheetFunction.Max(Range("B1:B5"))
Do Until ActiveCell.Value = varMax
ActiveCell.Offset(1, 0).Select
Loop
MsgBox "The max profit is: " & varMax & " it happens in year" & ActiveCell.Offset(0, -1).Value
End Sub
A few tips:
Notice that you don't need to "Dim as" when you declare your variables
You store the MAX value in a variable. Notice that I use addresses as arguments for WorksheetFunction.Max. IT makes the code easier to read. Named fields and variables are cool but they tend to make the code obscure.
Agreeing with Colin you need to select the cell containing the max and the year is in the cell on the left: Activecell.Offset(0,-1).value.
Offset is the VBA word that you will use the most. Learn all about it and also about CurrentRegion in my tutorial at
Free Help on VBA for Excel (Macros)
Enjoy