Results 1 to 2 of 2

copy cells of one sheet in a workbook to another sheet of the same workbook

Threaded View

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    74

    copy cells of one sheet in a workbook to another sheet of the same workbook

    hi all,
    i am facing a problem. i have a master sheet and some working sheets in the same workbook. in the master sheet there are 3 column heads. T1, T2 and T3.
    the working sheets could be either T1, T2 or T3. If working sheet is T1, range E14:F88 of the working sheet has to be copied to the master sheet under the column head T1 and if the working sheet is T2, that range to be copied under the column head T2 and same for T3.

    i have written the code but its not working. in the working sheets T1, T2 or T3 is written on cell B8. worksheet(1) is the master sheet while worksheet(2) is the working sheet.

    Sub addvalues()
    
    For p = 7 To 9
    
        If Worksheets(1).Cells(9, p) = Worksheets(2).Cells(8, 2) Then
        
            m = p
        
        End If
    
    Next p
        
    
        
    For y = 14 To 88
    
        For Z = 5 To 6
        
            Worksheets(1).Cells(Z, y) = Worksheets(2).Cells(Z, y)
            Worksheets(1).Cells(Z, m) = Worksheets(2).Cells(Z, m)
            
        Next Z
        
    Next y
        
    End Sub
    thanks.
    Prajesh
    Last edited by prajesh; 12-16-2011 at 02:10 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1