Hi,
I have two different files say 'File_A' & 'File_B'. I have copied the data from 'File_A', now I want to paste it in 'File_B'
The thing is my 'File_B' in in the format as attached. How do I paste it in the last blank column for a particular row..(say 102 row no)
Below is my code..but my data gets pasted in the previous column everytime I run it..say first time it gets pasted in column D, then in column C like that.
Please suggest the changes in my code.
Sub Test()
Workbooks.Open "C:\Data\File_B"
Worksheets("Sheet9").Activate
Worksheets("Sheet9").Select
Range("B" & Rows.Count).End(xlUp).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Workbooks("File_B").Sheets("A1").Activate
Dim last_col As Integer
last_col = Cells(102, Columns.Count).End(xlToLeft).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
ActiveWorkbook.Save
End Sub
Bookmarks