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

Copy row data to multiple sheets in another work book

srirajsa

Member
Sir

Can any one help me with any macro to copy emp nos from emp nos Range F2 to F520 to all the sheets B4 and B24 as per below example

For example

Emp nos

File 1

A
9325
9349
9328
9349

We need to copy to file ROughlayout

Sheet 1 in B4 9325 and B24 9349 and in Sheet 2 in B4 9328 and B24 9349 so on

Thanks & regards

Srinivas


▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !
 

Attachments

  • roughlayout1.xlsx
    942.2 KB · Views: 3
try this:
Code:
Option Explicit

Sub EENum()
    Dim ws As Worksheet
    Dim i As Long, This As Worksheet
    Set This = Sheets("Sheet1")
    i = 2
    For Each ws In Worksheets
        If ws.Name <> "Sheet1" Then
            ws.Range("B4") = This.Range("F" & i)
            ws.Range("B24") = This.Range("F" & i + 1)
            i = i + 2
        End If
    Next ws
End Sub
 
Then try this amended code
Code:
Sub EENum()
    Dim ws As Worksheet
    Dim i As Long, This As Worksheet
    Set This = Sheets("Sheet1")
    i = 2
    For Each ws In Worksheets
        If ws.Name <> "Sheet1" Then
            ws.Range("B4") = This.Range("F" & i)
            'ws.Range("B24") = This.Range("F" & i + 1)
            i = i + 1
        End If
    Next ws
End Sub
 
Back
Top