Results 1 to 4 of 4

Thread: vba copy/paste code don't copy the new values...

  1. #1

    vba copy/paste code don't copy the new values...



    Register for a FREE account, and/
    or Log in to avoid these ads!

    first sorry for my English is not very good,
    column Q contains a formula that gives in cells a value and after 5 minutes the value disappears
    i use this code for auto copy paste from Q:Q to V:V
    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)    
      If Not Intersect(Target, [Q1]) Is Nothing Then        
      [v1:V100] = [q1:q100].Value     
     End If  End Sub
    but when a blank cell in Q take a value, not copied in V ,and sometimes not copied either the existing values.
    why that happens? i want to copied when a cell in Q take a value because after 5 min the value disappears.
    must correct something in my code?

  2. #2
    Maybe this

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not Intersect(Target, Me.Columns("Q")) Is Nothing Then        
            Target.Copy Me.Cells(Target.Row, "V")    
        End If  
     End Sub

  3. #3
    thank for your response,again the values not copy paste automatically must click each cell to be copied.

  4. #4
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    751
    Articles
    0
    Excel Version
    Excel 2010 64bit
    The Worksheet_Change event is not fired by a cell containing a formula.

Tags for this Thread

Posting Permissions

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