View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Loop 20 columns Help!

If i understand you correct then
You can use a function.

Sub test()
MsgBox Application.WorksheetFunction.Max(Range("A1:d100") )
MsgBox Application.WorksheetFunction.Min(Range("A1:d100") )
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Michael168 " wrote in message ...
Hello!VBA expert,

Can someone tell me how to loop in VBA?

I want to loop through 20 columns in order to get the smallest and
biggest value.

Thanks
Michael


---
Message posted from http://www.ExcelForum.com/