This could be a start:-
Code (1) first loop through the range of cell to initialise all the variables. (The variables are 10 different numbers in Range ("A1:A10")) NB:- You could skip this first bit if you want to assign your variables in a different way It then loops through the Array, by setting the first number as Max and then, if the next number in array is larger than the previous then that becomes the Max .
You can also set the Array as a single Variant, variable as shown in the second bit of code, and then use the Worksheetfunction.Max.
NB:- Variant arrays always have two Indices as shown
I hope this helps
Mick
Bookmarks