Selasa, 06 Agustus 2019

RE: [ExcelVBA] excel vba for each loop in multiple ranges

 


I agree, Paul, but I'm having trouble getting David's "Do the stuff" statement to work for me!  I must be typing it wrong.

;>)
Dunbar

---In ExcelVBA@yahoogroups.com, <paul.vermeulen@...> wrote :

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@...>
------------------------------------

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
------------------------------------
------------------------------------

Yahoo Groups Links

__._,_.___

Posted by: h_dunbar@hotmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
------------------------------------

.

__,_._,___

Tidak ada komentar:

Posting Komentar