• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Loop through a series of names printing after each name

mm5382

New Member
What I want the code to do is have cell on the first tab = the first name on the the second tab and then print, after printing I want the same cell on the first tab = the next name on the second tab and print, and continue that pattern until there it has gone through every name on the second tab. Any help with this would be very much appreciated. Thanks!


MK
 
Hi,


1. could you please kindly upload a sample file to look at?

2. you can draw some insight from what SirJB7 has helped me. I think it is very similar (not 100% identical though) in what we are asking.


http://chandoo.org/forums/topic/how-to-write-a-macro-to-print-data-pertaining-to-a-list-box
 
This should help get you started:

[pre]
Code:
Sub DoSomething()
Dim NameList As Range
Dim DestCell As Range

'Where is the list of names?
Set NameList = Worksheets("Sheet2").Range("A1:A10")

'Where does the name need to go?
Set DestCell = Worksheets("Sheet1").Range("A1")

For Each c In NameList
DestCell = c.Value

'Some sort of code to print sheet 1
Next c

End Sub
[/pre]
 
I apologize for not uploading a file. Im not sure what the rules are with that while im at work but, what you sent me actually worked perfectly!! Thanks very much for your help!


-MK
 
Hi, mm5382!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the three first green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


Regards
 
Back
Top