+ Reply to Thread
Results 1 to 3 of 3

Automatically copy a cell

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

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

    Re: Automatically copy a cell

    please help me

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Automatically copy a cell

    Hi,

    Please abide by the forum rules. You should not be using PMs to seek answers to forum posts. With 37 posts you should know better.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

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