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

Importing Text Into Only A3 In Every Worksheet

I was hoping someone could help with importing text into cell "A3" only of every worksheet.


I would actually like to start at worksheet 5, and so on until the last sheet.
 
What exactly do you mean by import? And why only one cell? What if the "import" contains too much data to go into once cell? Perhaps an example of what you'd like to see, maybe:


"I start with the phrase "Hello World" from another workbook, and it puts "Hello" into A3 of sheet 5, "World" into cell A3 of sheet 6"
 
I have a list of names:


Name_01

Name_02

Name_03...


I would like to import them into each worksheet:


Name_01 into cell "A3" of Worksheet 1

Name_02 into cell "A3" of Worksheet 2

Name_03 into cell "A3" of Worksheet 3


I've been thinking about the easiest cleanest way to do this, and I'm open to any ideas.


I basically need to import a list of unique names into cell "A3" of every worksheet.
 
Here's a short macro that should be able to do what you ask. Note that you need to define what your starting worksheet it, and what sheet and range your list of names is in.

Code:
Sub GenerateNames()

Dim xStart As Boolean

Dim i As Long


xStart = False

i = 1


For Each ws In ThisWorkbook.Worksheets

'Which sheet do we start populating on?

If ws.Name = "Worksheet 2" Then xStart = True


If xStart Then

'Define where your start data is

ws.Range("A3") = Worksheets("WhereMyDataIs").Range("A2:A10").Cells(i, 1)

i = i + 1

End If

Next ws


End Sub
 
Back
Top