• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy Paste the Specific Cell value repeatedly in column till blank rows cell found

Status
Not open for further replies.

AmitSingh

Member
Hi All,

Need urgent help to copy paste the cell value to another sheet of column till it finds blank rows.

I have attached the file with 3 sheet tab, Student sheet is source tab, Marks sheets is output tab and OutputRequired sheet tab is the desired output which i want.

Below is the code which i have tried but it paste only paste the value in single time.

Code:-
Sub pastevalue()

Dim r As Range

ThisWorkbook.Worksheets("Student").Activate
Set r = Range("A2")
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
ThisWorkbook.Worksheets("Marks").Activate
Range("A2").Select
Do While r.Value <> ""
Range("A2").Value = r.Value
Set r = r.Offset(1)
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Loop

End Sub

Any help will be much appreciated. Thanks in advance.
 

Attachments

  • Test.xlsb
    299.4 KB · Views: 1
Status
Not open for further replies.
Back
Top