![]() |
Run aloop using a list
Hi,
I would like to run a macro in loop using a list already prepared in Excel. How can I program it? Regards, Sébastien |
Run aloop using a list
You can use the For Loop. Let's say your list is in column Z from Z12 to Z20
and you want to process the list - Output them: Sub do_list() Dim r As Range Set r = Range("Z12:Z20") For Each rr In r MsgBox (rr.Value) Next End Sub -- Gary''s Student - gsnu200719 "answer33" wrote: Hi, I would like to run a macro in loop using a list already prepared in Excel. How can I program it? Regards, Sébastien |
Run aloop using a list
Thank's for your help,
Sebastien "Gary''s Student" wrote: You can use the For Loop. Let's say your list is in column Z from Z12 to Z20 and you want to process the list - Output them: Sub do_list() Dim r As Range Set r = Range("Z12:Z20") For Each rr In r MsgBox (rr.Value) Next End Sub -- Gary''s Student - gsnu200719 "answer33" wrote: Hi, I would like to run a macro in loop using a list already prepared in Excel. How can I program it? Regards, Sébastien |
Run aloop using a list
You are welcome.
Submit another post if you need more assistance. -- Gary''s Student - gsnu200719 "answer33" wrote: Thank's for your help, Sebastien "Gary''s Student" wrote: You can use the For Loop. Let's say your list is in column Z from Z12 to Z20 and you want to process the list - Output them: Sub do_list() Dim r As Range Set r = Range("Z12:Z20") For Each rr In r MsgBox (rr.Value) Next End Sub -- Gary''s Student - gsnu200719 "answer33" wrote: Hi, I would like to run a macro in loop using a list already prepared in Excel. How can I program it? Regards, Sébastien |
All times are GMT +1. The time now is 07:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com