David, that is so elegant in its simplicity!
Paul
From: ExcelVBA@yahoogroups.com <ExcelVBA@yahoogroups.com>
Sent: Sunday, 4 August 2019 8:53 PM
To: ExcelVBA@yahoogroups.com
Subject: RE: [ExcelVBA] excel vba for each loop in multiple ranges
Hi Torstein
I would try something like
For x = 1 to 9
Myrange = range("range" & x)
Do the stuff
Next x
Regards
David Grugeon
0429 029 836
-----Original Message-----
From: ExcelVBA@yahoogroups.com <ExcelVBA@yahoogroups.com>
Sent: Sunday, 4 August 2019 9:07 PM
To: yahoogroups <ExcelVBA@yahoogroups.com>
Subject: [ExcelVBA] excel vba for each loop in multiple ranges
I watt to perform some operations on each cell in a range named range1 and
then the same operations on all cell in range named range2 and furter on..
i can of course code this like
for each cell in range1
.....
.....
.....
next
for each cell in range2
.....
.....
.....
next
and furter on, but is there a simpler/more elegant way to do this.?
I can not perform this on a union of ranges, it has to be done on each range
separetely.
regards
Torstein
------------------------------------
Posted by: Torstein Johnsen <sejohnse@yahoo.no>
------------------------------------
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
------------------------------------
------------------------------------
Yahoo Groups Links
Posted by: Torstein Johnsen <sejohnse@yahoo.no>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
------------------------------------
Tidak ada komentar:
Posting Komentar