View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

for k = 1 to 27

or ...


with activesheet
for k = .range("a1").column to .range("aa1").column



======
If you're using .cells(), then it can accept either letters or numbers for the
column:

cells(1,3).value = "asdf"
is just as ok as:
cells(1,"C").value = "asdf"



kizzie wrote:

Hello,

How do I write a for loop over columns? e.g. For k= A to AA ... is not
working...

thx in advance

--
kizzie
------------------------------------------------------------------------
kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092
View this thread: http://www.excelforum.com/showthread...hreadid=394203


--

Dave Peterson