On selection range of data value show in another row in a range

  • Hi,

    I am working on a project in which I face a problem that I want to share. Hope someone understands and helps me to solve the problem.

    If I select any cell of F9 to I1200 then the target row data from P to U will be shown in P3 to U3. I have the below code but not show the expected result.

    Thanks in Advance

  • Try

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Target.Count > 1 Then Exit Sub
        If Target = vbNullString Then Exit Sub
        If Target.Column > 5 And Target.Column < 10 Then
           [p3].Resize(, 6) = Cells(Target.Row, 16).Resize(, 6)
        End If
    End Sub

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Thanks

    I found the problem and solve it by the below code.

    Sheets("Bill").[P3].Resize(, 6).Value = Cells(Target.Row, 16).Resize(, 6).Value

    and It gives me the expected result.

    Thanks and best regards.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!