Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Please help?!

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hiya! I am having trouble with the syntax required to extract values from a closed workbook and place them into the active workbook. Here is what I need to do: I have an employee data file that has the first name in row B and the last name in row C. I need to loop through 75 lines and use the & command to place the full employee name in cell A1, A2, A3 etc of the open workbook.
    Example. The employee file is employee.xls.
    B1 = John C1 = Doe
    Copy and paste "John Doe" into cell A1 of the active open workbook.

    Thanks in advance

  2. #2
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,450
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-10 09:42, Wingz wrote:
    Hiya! I am having trouble with the syntax required to extract values from a closed workbook and place them into the active workbook. Here is what I need to do: I have an employee data file that has the first name in row B and the last name in row C. I need to loop through 75 lines and use the & command to place the full employee name in cell A1, A2, A3 etc of the open workbook.
    Example. The employee file is employee.xls.
    B1 = John C1 = Doe
    Copy and paste "John Doe" into cell A1 of the active open workbook.

    Thanks in advance
    ='[employee.xls]sheet1'!b1&" "&c1

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, but because the cell reference is R1C1 I am not able to use looping variables. I need to be able to change the row number each time I pass through the loop. I believe the only way to do it is using something like

    Dim x As Integer
    for x = 1 to 75
    (Here is where I go out of range)
    activecell.value = Workbooks("C:My Documentsemployees.xls).Worksheets(1).cells(x,1)

    or something along these lines...

    Any other suggestions?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •