Merging Excel cells Thread poster: Jean-Christophe Duc
|
Is it possible to merge automatically two Excel sheets (say 1 and 2), so that the column A of sheet 2 becomes the column B of sheet 1?
[Edited at 2016-10-12 17:11 GMT] | | | Cut and paste? | Oct 12, 2016 |
I am no expert, but cut and paste should work... COPY and paste, to be safe.
[Edited at 2016-10-12 15:43 GMT] | | | It sure works... | Oct 12, 2016 |
... but when sheets have up to 10 or 20 tabs, it quickly becomes boring. Hence, an automatic or semi-automatic solution would help... | | | Platary (X) Local time: 11:23 German to French + ...
does it very simple. Try something like the following : Sub CopieAE() Range("B1").Select Sheets("Feuil2").Columns("A:C").Copy Sheets("Feuil1").Columns(2) End Sub Run this macro in the target sheet and adapt of course the sheet number (or name) to be copied and the range (from to columns). Done! Otherwhise you could also wrtite such a following formula (to be adapted of course) in B1 in the target... See more does it very simple. Try something like the following : Sub CopieAE() Range("B1").Select Sheets("Feuil2").Columns("A:C").Copy Sheets("Feuil1").Columns(2) End Sub Run this macro in the target sheet and adapt of course the sheet number (or name) to be copied and the range (from to columns). Done! Otherwhise you could also wrtite such a following formula (to be adapted of course) in B1 in the target sheet : Feuil2!RC[-5]:R[1]C[-5] which could also be inserted in another macro : Sub sheetinsheet() ActiveCell.FormulaR1C1 = "=Feuil2!RC[-5]:R[1]C[-5]" Range("I1").Select Selection.AutoFill Destination:=Range("I1:I25"), Type:=xlFillDefault End Sub Hope this helps, other possibilities may exist, but i know these are working. Good luck! ▲ Collapse | |
|
|
I'll look into it. Is there a way to iterate it for n number of tabs? | | | Alison High Switzerland Local time: 11:23 French to English + ... use concatenate formula | Oct 13, 2016 |
If the cells you want to merge are A1 and B1 and you want the merged result of A1 and B1 in C1 enter this formula in C1 =CONCATENATE(A1,B1)
To make it work for multiple rows just drag the bottom right corner of C1 (+ shaped cursor) down for as many rows as you want.... this automatically deploys the formula i.e. row 16 is now =CONCATENATE(A16,B16), which is the result of A16 merged with B16. If you need to add a space between ... See more If the cells you want to merge are A1 and B1 and you want the merged result of A1 and B1 in C1 enter this formula in C1 =CONCATENATE(A1,B1)
To make it work for multiple rows just drag the bottom right corner of C1 (+ shaped cursor) down for as many rows as you want.... this automatically deploys the formula i.e. row 16 is now =CONCATENATE(A16,B16), which is the result of A16 merged with B16. If you need to add a space between the content of the merged cells =CONCATENATE(A1," ",B1)
For those using the French-Language version of excel you need the french formula word and semicolons, not commas. =CONCATENER(A1;" ";B1)
▲ Collapse | | | Thanks, but... | Oct 14, 2016 |
... I need to merge two different sheets, not cells. | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Merging Excel cells CafeTran Espresso | You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
| Protemos translation business management system | Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!
The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |