Thread: Loop printing
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
George Hill George Hill is offline
external usenet poster
 
Posts: 2
Default Loop printing

Brilliant! Thank you so much.

By the way, I get a Runtime Error 13 (Type Mismatch) in this line:

for i=1 to range("A1").end(xldown).rows

But never mind, I just have a =counta on the range in say C1 and then make
it for i=1 to range("C1") - and that works.

Thanks so much for your time.


"PY & Associates" wrote:

If names start from cell A1
then

for i=1 to range("A1").end(xldown).rows
range("B1")=range("A" & i)
' do other things
next i

"George Hill" wrote in message
...
I have a range of people's first names in a column, say Column A. I am

after
a script that takes the first name of the list and puts it into a certain
cell, say B1 (I need that so that some conditional formatting can take

place
somewhere else) and then executes a print command (I want to print a range
that the conditional formating was applied to). Then it needs to put the
second name in B1, print. Third name into B1, print ...

I am pretty much stuck at the looping bit as my VB knowledge is very

limited
(but I am good at recording macros (-: )

Any help would be much appreciated.