View Single Post
  #5   Report Post  
Posted to microsoft.public.access,microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Finding the biggest number out of 8 variables

You asked this same question over in one of the compiled VB newsgroups; so,
because this is an Excel newsgroup, I think you need to clarify something
for us. Are you working in Excel? If so, is your question a VBA question? If
so, what are your variable's names? Or do you mean "variables" in a more
general sense, that being cells on a worksheet? I ask this last question
because if you have your posted values in a worksheet, say in cells A1, B1,
through to H1, then you could use the worksheet's MAX function to get your
value... =MAX(A1:H1) for my assumed cells A1 through H1.

--
Rick (MVP - Excel)


"Mojo" wrote in message
...
Hi All

Does anybody know of an easy way to find out which variable has the
highest
value out of 8 variables?

For example, I have these values in 8 vars:

3 0 7 30 37 17 0 7

Although from a human's perspective it's easy to see that the 5th var has
the highest value, how can I chose the appriopriate var programmatically?

Thanks