Solved

copy data from single cell into merged different wkbs

Posted on 2013-06-03
5
589 Views
Last Modified: 2013-06-04
Hi experts

how would you copy data in workbook 1, worksheet 1 cell a2 into workbook 2 worksheet 1 merged cells a2:a10 and then cell a3 wkb1 into merged cells a11:a19 wkb2...
0
Comment
Question by:route217
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 

Author Comment

by:route217
ID: 39216504
The process has to be repeat 500 times single cell to merged
0
 
LVL 34

Accepted Solution

by:
Norie earned 500 total points
ID: 39216722
Try this, change workbook, worksheet names as needed.
Sub CopyToMergedCells()
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim rngSrc As Range
Dim rngDst As Range

       Set wb1 = Workbooks("Book1")
       Set wb2 = Workbooks("Book2")

       Set rngSrc = wb1.Worksheets("Sheet1").Range("A2")
       Set rngDst = wb2.Worksheets("Sheet1").Range("A2")

       Do Until rngSrc.Value = ""
            rngDst.Value = rngSrc.Value
            Set rngSrc = rngSrc.Offset(1)
            Set rngDst = rngDst.Offset(1)
       Loop

End Sub

Open in new window

0
 

Author Comment

by:route217
ID: 39217337
Thanks for the feedback
0
 

Author Comment

by:route217
ID: 39218208
Excellent imnorie. ....
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question