Results 1 to 3 of 3

Automatically copy a cell

Threaded View

  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    saudia
    MS-Off Ver
    Excel 2010
    Posts
    44

    Automatically copy a cell

    Hi
    I need help edit code macro automatically copy of cell and paste to other cell
    I need also copy cells and past in row 4

    Private Sub Worksheet_Calculate()
        Dim c As Range
        Application.EnableEvents = False
        On Error Resume Next
        For Each c In Range("H7:H" & Cells(Rows.Count, "H").End(xlUp).Row)
            If c = "Yes" Then
                c.Offset(, 1).Value = "Yes"
                If c.Offset(, 2) = "" Then
                    c.Offset(, 2).Value = c.Offset(, -7).Value
                    c.Offset(, 3).Value = c.Offset(, -6).Value
                    c.Offset(, 4).Value = c.Offset(, -5).Value
                    c.Offset(, 5).Value = c.Offset(, -2).Value
        
                End If
            End If
        Next c
        Application.EnableEvents = True
    End Sub
    excelpic.jpg
    Attached Files Attached Files
    Last edited by JBeaucaire; 03-22-2013 at 03:29 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