Copy data from one sheet to another sheet quickly.

harzer

Board Regular
Joined
Dec 15, 2021
Messages
122
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone,
I have the sheet named: "B_D" which contains very important data, it is composed of 10 columns and a very important and variable number of rows.
I am looking for a code that could very quickly copy all the data from the "B_D" sheet to the "Result" sheet.
For your information, the "A" column of the "B_D" sheet contains unique cells, I communicate this information to you, so you can orient yourself for the use of a dictionary in combination with UBound(Ary, 1), for build faster vba code.
I remain at your disposal for any additional information.
Good for you.

Arbre Généalogique.xlsm
ABCDEFGHIJ
1JeunePèreMèreEleveurVolièreCageNé(e)ToursInformationElevage
2876-054/2004 F856-061/2002 M856-047/2002 FMartens S5B3016-04-20044TFemelle
3876-025/2006 FAC10-008/2010 M876-027/2005 FMartens S5B3015-04-20064TFemelle
4SC14-028/2006 F235-096/2005 MSC14-005/2004 FMartens S5B3015-04-20064TFemelle
5SC14-041/2006 MSC14-045/2004 MSC14-009/2004 FMartens S5B3015-04-20064TMâle
6SC14-068/2006 MCT10-075/2005 MSC14-020/2005 FMartens S5B3015-04-20064TMâle
70811-076/2006 M0811-055/2005 M0811-044/2005 FMartens S5B3015-04-20064TMâle
8SC14-011/2007 FCT10-075/2005 MSC14-032/2005 FMartens S5B3015-04-20074TFemelle
9SC55-014/2007 MSC14-029/2006 MSC14-020/2006 FMartens S5B3015-04-20074TMâle
10876-022/2007 M856-048/2006 M856-166/2006 FMartens S5B3015-04-20074TMâle
11876-033/2007 F856-053/2006 M876-054/2004 FMartens S5B3015-04-20074TFemelle
12SC14-040/2007 M235-096/2005 MSC14-020/2005 FMartens S5B3015-04-20074TMâle
13876-049/2007 F856-048/2006 M876-025/2006 FMartens S5B3015-04-20074TFemelle
14SC14-067/2007 FSC14-068/2006 MSC14-019/2006 FMartens S5B3015-04-20074TFemelle
15SC14-068/2007 FSC14-068/2006 MSC14-019/2006 FMartens S5B3015-04-20074TFemelle
16SC55-075/2007 FCT10-049/2006 MSC14-004/2006 FMartens S5B3016-04-20075TFemelle
17SC14-003/2008 F235-096/2005 MSC14-014/2004 FMartens S5B3015-04-20084TFemelle
18856-004/2008 F856-064/2009 M856-038/2009 FMartens S5B3015-04-20084TFemelle
19838-010/2008 M838-092/2007 M838-002/2007 FMartens S5B3015-04-20084TMâle
20SC14-012/2008 FSC14-068/2006 MSC14-028/2006 FMartens S5B3015-04-20084TFemelle
21SC14-014/2008 MSC14-040/2007 MSC14-011/2007 FMartens S5B3015-04-20084TMâle
220811-015/2008 F0811-009/2007 M0811-075/2006 FMartens S5B3015-04-20084TFemelle
23838-017/2008 M838-092/2007 M838-090/2007 FMartens S5B3015-04-20084TMâle
24SC55-017/2008 MSC55-014/2007 MSC55-075/2007 FMartens S5B3015-05-20084TMâle
25SC14-018/2008 FSC14-040/2007 MSC14-011/2007 FMartens S5B3015-04-20084TFemelle
B_D
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You didn't mention where to put the data in the 'Results' sheet so how about:

VBA Code:
Sheets("B_D").UsedRange.Copy Sheets("Result").Range("A1")
 
Upvote 0
Hello johnnyL,
Thank you for your reply.
I forgot to specify in my request that there are other columns after the 10th column.
How could you modify the code so that it can only copy the data on the first 10 columns.
Cheers.
 
Upvote 0
VBA Code:
Sheets("B_D").Range("A1:J" & Range("A:J").Find("*", , xlFormulas, , xlByRows, xlPrevious).Row).Copy Sheets("Result").Range("A1")
 
Upvote 0
Hello johnnyL,
Thanks for correcting the code.
It's PERFECT, it works very well.
Friendly greetings
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,540
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top