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

concatenate two column from other workbook

i have two sheets one is raw data and other is the master data.

Raw data has field for ex:
col A Col B Col C
NAME Month Age
A june 23
B July 43
C Jan 56
D Feb 78
E April 97

I want this field in master file Starting from A4 as
Column Data needed
A4 Ajune23
A5 BJuly43
A6 CJan56
A7 DFeb78
A8 EApril97


Please help with a vba code which not only gives data but also work when my raw data has large number of data.
 
Aman Semwal
In the beginning You write about two workbooks (which names?) ...
and next You write about two worksheets (what are names?)...
One worksheet is 'raw data' (or is that name too?)
and other worksheet is 'the master data' (or is that name too?).
Which worksheet is in which name workbook or how do this goes?
.. and are both workbooks open in the beginning?
If there is 'old data', overwrite or add 'new data'?
Or how would You use those?
 
Raw data is a workbook..
Master data is another workbook

I need data from raw to master
And concatenate should start from A4 of sheet1 in master file.
 
Aman Semwal ... Okay
There are two workbooks ...
but many missing answers ...
You could test next sample.
Without clear informations, this would be a guess ...
Hints:
1) both workbooks have to be open
2) copy below code ... You can choose Yourself
3) change used names to code
4) run it
Code:
Sub Do_It()
    Application.ScreenUpdating = False
'   change used names below
    raw_book = "raw_workbook_name"
    raw_sheet = "raw_sheet_name"
    master_book = "master_workbook_name"
    master_sheet = "master_sheet_name"
    m = 4
    r = 2
    Do
        With Workbooks(raw_book).Sheets(raw_sheet)
            Workbooks(master_book).Sheets(master_sheet).Cells(m, 1) = .Cells(r, 1) & .Cells(r, 2) & .Cells(r, 3)
        End With
        r = r + 1
        m = m + 1
    Loop Until Workbooks(raw_book).Sheets(raw_sheet).Cells(r, 1) = Empty
    Application.ScreenUpdating = True
End Sub
 
Back
Top