ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loop 20 columns Help! (https://www.excelbanter.com/excel-programming/303044-loop-20-columns-help.html)

Michael168[_106_]

Loop 20 columns Help!
 
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 an
biggest value.

Thanks
Michae

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


Ron de Bruin

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/




Michael168[_107_]

Loop 20 columns Help!
 
Hi!Ron de Bruin,

Thanks for the tips and you understand correctly what I meant.

"Little tips solve the problems."

Regards,
Michael.

Ron de Bruin wrote:
*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 i
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/


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



All times are GMT +1. The time now is 11:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com