VBA to Consolidate data from Multiple Sheets - Excel VBA Example by Exceldestination

  Рет қаралды 102,658

Excel Destination

Excel Destination

Күн бұрын

Пікірлер: 117
@AkaExcel
@AkaExcel 6 жыл бұрын
I entered above VBA code, it worked PERFECT! Now it is very easy to import data from different worksheets! Thank You, Excel Destination! More such videos pls!
@rafaelmartinezoliva7867
@rafaelmartinezoliva7867 Жыл бұрын
After I finished my course for basics VBA and did some programming here and there in Excel, I wanted to go further with practical, daily-life examples that I could come up with, and your videos are 100% like that, I am learning a lot with your videos. Thanks a lot :)
@sasavienne
@sasavienne 5 жыл бұрын
That is stunning. Thank you so much for sharing this truly useful video. 👏 🌟 🌟 🌟 🌟
@MohAboAbdo
@MohAboAbdo 5 жыл бұрын
Thank you very much for this great video and this simple explanation
@MM-oe2eo
@MM-oe2eo 2 жыл бұрын
Thank you, you made it easy to follow. My understanding is the codes copies each row and not a block of cells.
@deepakjohn9295
@deepakjohn9295 4 жыл бұрын
Awesome. Thank you!!
@jonasandresen9620
@jonasandresen9620 Жыл бұрын
This is great, thanks Excel Destination! :)
@stefanescuh
@stefanescuh 4 жыл бұрын
Thanks a lot for your ideas!
@kthlnmbr
@kthlnmbr 3 жыл бұрын
Thank you for your tutorial, but I noticed that if we alter data on sheets (“aa.-dd”) or update the details, it will add to Mastersheet as a new count. Hope you can help me. Thank you.
@arslantahir1042
@arslantahir1042 5 жыл бұрын
If i need to extravt data of specific values or word remarks What will be the code
@wongpeggy4363
@wongpeggy4363 4 жыл бұрын
but sirs, why it keep asking me to save a copy.
@wongpeggy4363
@wongpeggy4363 4 жыл бұрын
it is really good make my works super fast. only keep asked me to make a copy for every worksheets
@jzngyi6920
@jzngyi6920 6 жыл бұрын
How to exclude more sheets instead of only the mastersheet is excluded?
@usamaghori3949
@usamaghori3949 6 жыл бұрын
Can we transpose the data in master sheet?
@lifeofcommonmanvlog
@lifeofcommonmanvlog 2 жыл бұрын
Hi Your video very useful, however i have one questions, how to ignore the hide sheets while consolidating the sheets. while consolidating the date it picks the hide data also
@lukeshelly6426
@lukeshelly6426 5 жыл бұрын
I am in option explicit mode I keep getting debug errors to define the variables for "totalsheets" and "i" so i set both their dimensions to "Dim totalsheet As worksheets, i as worksheet" then i errors out again as a type mismatch What datatype should be totalsheet and worksheet be? Please help!!!!
@prabhukumar284
@prabhukumar284 5 жыл бұрын
luke shelly remove option explicit mode. Then it ll run
@anirudhghosh1780
@anirudhghosh1780 4 жыл бұрын
The tutorial looks good and easy to implement. However there is an issue here with my Micro and also there is an additional requirement. The issue is the selection copy is working fine. However the paste functionality isn't working. When i troubleshoot the VBA with alt+f8 I see the respective rows of each sheet being selected and copied in the clipboard. However it is not being pasted in the mastersheet About the requirement- alongwith the data in each of the sheets I also want to copy the name of the sheets from which these data is collated into the mastersheet. Is there any variable that stores this value? How can I attach it with the output
@ExcelDestination
@ExcelDestination 4 жыл бұрын
you can send me email with your file at EXCELDESTINATION@GMAIL.COM
@gusmar8850
@gusmar8850 5 жыл бұрын
Great example and application. I deployed it in a command button in my user-form and its runs perfectly but for some reason while it transfers the data once and in the correct order it also creates another copy of the entries below making the worksheet 600 lines instead of 300. Any thoughts on this ? Keep up the great job !
@divyanivalkar7877
@divyanivalkar7877 Жыл бұрын
Can i used this code if the header of columns is different
@Joda-es5xd
@Joda-es5xd 4 жыл бұрын
Hi, I wrote a VBA that copies from Mastersheet if the value is equals to specific one the copy entire row on specific sheet. My issue, it keeps copying the same data duplicating the same entries, how can I correct that?
@ExcelDestination
@ExcelDestination 4 жыл бұрын
You can take help to prevent duplicates, from following tutorial : kzfaq.info/get/bejne/r7aFdttqrbq6pqM.html
@brendaoberholzer3923
@brendaoberholzer3923 4 жыл бұрын
Would it be possible to get the code? I believe this is exactly what I need to do but I am not familiar with writing code.
@ExcelDestination
@ExcelDestination 4 жыл бұрын
pls. send me email at EXCELDESTINATION@GMAIL.COM I will check in my computer, If I have original file with me then I will provide you that. Thanks for Watching!
@ericasimmons2600
@ericasimmons2600 4 жыл бұрын
Thank you, I was able to get this to work. One quick question, how do I exclude to worksheets?
@ExcelDestination
@ExcelDestination 4 жыл бұрын
you can use if worksheets("sheetname")"sheetname" and then start your code.
@anhnhatnguyet4628
@anhnhatnguyet4628 Жыл бұрын
Merge multiple excel files with multiple sheets/every file in a folder, the resulting data file is directly put into a single sheet (the files to be joined have the same structure, and the title starts from A1), how to use VBA?
@nagarajarachaiah33
@nagarajarachaiah33 4 жыл бұрын
Thank you, But when i run this macro multiple time it will copy again same data in mastersheet. please help me.
@ExcelDestination
@ExcelDestination 4 жыл бұрын
you can check following tutorial for vba code to prevent duplicates. kzfaq.info/get/bejne/r7aFdttqrbq6pqM.html
@al-wahid5538
@al-wahid5538 4 жыл бұрын
Hi, My data on each sheet is in column B. But not on 2nd row, it is pasted anywhere in column B. But the common thing is header has content "Sr No". I want my macro to select that cell containing "Sr No" till lastrow. Please advice, how can I do it.
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Thanks for your comment. For any excel vba support, you can write to exceldestination@gmail.com
@imJoleneee
@imJoleneee 4 жыл бұрын
Hi, When i run the script, it keeps prompting Run time error '1004' : Application-defined or object-defined error. Then it highlights this sentence: Lastrow = Worksheets(i).Cells(Rows.Count, 1).End(x1Up).Row Please advise. Thanks!
@ExcelDestination
@ExcelDestination 4 жыл бұрын
I can not say anything without looking at your code. However, you can understand Run time error '1004' by checking this tutorial, I have made for this specific error kzfaq.info/get/bejne/Y7egpKmYm9GzgKs.html
@imJoleneee
@imJoleneee 4 жыл бұрын
@@ExcelDestination Thank you for the video! I've actually emailed you with my codes. Could you please help me take a look? Thanks!
@nitya8019
@nitya8019 5 жыл бұрын
Awesome code
@onefmscreens3096
@onefmscreens3096 4 жыл бұрын
How do i change code to select data where the headers are not at top of sheet in each sheet eg labels for data are in B5 >>>Q5
@ExcelDestination
@ExcelDestination 4 жыл бұрын
change the code accordingly
@hiprateek025
@hiprateek025 3 жыл бұрын
Thank you bro..it worked flawlessly ❤️ But I want to ask if I have to consolidate after I have added data in any of the sheets. Then how will it consolidate without repetition?
@dharmendrasharma3541
@dharmendrasharma3541 2 жыл бұрын
you can clear mastersheet then it will paste new data every time
@eduardoa3726
@eduardoa3726 6 жыл бұрын
Hello good afternoon. Great class. Congratulations! Just a question: I would like to inform you how to consolidate the data so that there are no duplicates (the repeated ones will be in only one row according to the item). Example: Worksheet 1 I have 2 units of Apples and 1 unit of Banana. Worksheet 2 I have 1 unit of Apple. That way, when I consolidate in the Master worksheet, a line of Apples with 3 units and a line of Bananas with 1 unit will appear.
@ExcelDestination
@ExcelDestination 6 жыл бұрын
Thanks for your appreciation! there is another tutorial which can help you to find appropriate code for removing duplicates...kzfaq.info/get/bejne/ra-Gga-D09-ppY0.html
@captainferoz
@captainferoz 4 жыл бұрын
Dear Friend, This video is very helpful. And also could you please post a video like this, related to, header column will be same in all worksheets of different workbooks particular sheet and how to Combine the desired data sheets datas from multiple workbooks to a single worksheet.
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Ok. Will create soon.
@sudhirkale569
@sudhirkale569 4 жыл бұрын
If you have one sheet which do not have any data but have only heading then in such case how to do consolidation
@ExcelDestination
@ExcelDestination 4 жыл бұрын
There would be some change required in this code. like considering headings only one time from specific sheet and considering data from 2nd row onward on other sheets and if data is not from 2nd row onwords.
@kishangzp
@kishangzp 4 жыл бұрын
you are a start ... excellent and simple... for those who need code Sub Combine() ' ' Combine Macro ' ' totalsheets = Worksheets.Count For i = 1 To totalsheets If Worksheets(i).Name "Conosle" Then lastrow = Worksheets(i).Cells(Rows.Count, 1).End(xlUp).Row For j = 2 To lastrow Worksheets(i).Activate Worksheets(i).Rows(j).Select Selection.Copy Worksheets("Console").Activate lastrow = Worksheets("Console").Cells(Rows.Count, 1).End(xlUp).Row Worksheets("Console").Cells(lastrow + 1, 1).Select ActiveSheet.Paste Next End If Next End Sub
@lejessica77
@lejessica77 4 жыл бұрын
Thank you for posting the code Krishan.
@soumayabhowmick694
@soumayabhowmick694 3 жыл бұрын
It is work sooooo good sir.thank you
@ExcelDestination
@ExcelDestination 3 жыл бұрын
Most welcome
@aamir6282
@aamir6282 4 жыл бұрын
nice vedio sir does this code work for 31 sheet i have to transfer all the data for the whol month to one master sheet
@ExcelDestination
@ExcelDestination 4 жыл бұрын
It would work. However, It would take longer time if data is large on all sheets.
@pc169
@pc169 3 жыл бұрын
This is great, but if you have dozens of tabs with hundreds of rows and columns, this will take a very long time. How can you do this by tab instead of by row one at a time, i.e. if you have 100 rows, you just copy all 100 rows at once instead of one at a time?
@nsanerydah
@nsanerydah 4 жыл бұрын
Great video Sir. Would this work if I only need to gather data from 12 of my 15 worksheets? I was thinking if you could add multiple entries on the main If statement. Thank you for making the video!
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Yes, It should work.
@nsanerydah
@nsanerydah 4 жыл бұрын
@@ExcelDestination Sir, would I separate the additional sheets using "and" or a comma? IF WorkSheets(i).Name "MasterSheet" and "WCSS" and "name" etc or IF WorkSheets(i).Name "MasterSheet", "WCSS", "name" etc? My apologies for asking too much questions. This is my last step to complete a project for work and I am not a "computer person." Thank you for any help / advice you could provide.
@zachelkort3042
@zachelkort3042 3 жыл бұрын
@@nsanerydah Did you ever get a response on this?
@nsanerydah
@nsanerydah 3 жыл бұрын
Zach Elkort not the second question. I believe I could test it to see if it worked though. I have sense moved on to another project with new challenges. Love searching for answers and finding new ways to reach my goal. I guess I should’ve went for a Computer Science degree instead of Criminal Justice...🤔
@rahulghosalkar4204
@rahulghosalkar4204 3 жыл бұрын
What if I have to get data from the two sheets only apart from master sheet then? Pls suggest ASAP
@ExcelDestination
@ExcelDestination 3 жыл бұрын
you can use same code, but skip master sheet with one if condition like : if activesheet.name " master sheet" then -----code--- end if
@rahulghosalkar4204
@rahulghosalkar4204 3 жыл бұрын
Actually there are 3 sheets other than master sheet like sheet 1 ,2 n 3 but I want to take data from only 1 n 2 and skip 3
@bharatdocuments7413
@bharatdocuments7413 3 жыл бұрын
why you don't use for each ws in thisworkbook.worksheet
@rajkumarpalle8217
@rajkumarpalle8217 Жыл бұрын
It was nice video . Thank you
@ExcelDestination
@ExcelDestination Жыл бұрын
☺️
@jonathannourdine
@jonathannourdine 4 жыл бұрын
Thanks sir. Very useful.👍👍
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Welcome 👍
@jonathannourdine
@jonathannourdine 4 жыл бұрын
@@ExcelDestination sir, I am getting complie error : sub or function not define. Pls can you help
@techpoint983
@techpoint983 6 жыл бұрын
Hello. How to transfer userform data to any sheet matching combobox critira to different sheet
@ExcelDestination
@ExcelDestination 6 жыл бұрын
Hello Shri...thanks for watching this tutorial...you can take help from my another tutorial, which is for userform...link is kzfaq.info/get/bejne/p52jlLGFteDPYZs.html even if it doesn't solve your problem...send me your file with some explanation of your requirement at EXCELDESTINATION@GMAIL.COM
@its_sunil2871
@its_sunil2871 3 жыл бұрын
Thankyou very much 😊
@ExcelDestination
@ExcelDestination 3 жыл бұрын
welcome
@vijaysahal4556
@vijaysahal4556 4 жыл бұрын
very good sir plz make a video with real job projects base there all condition
@ExcelDestination
@ExcelDestination 4 жыл бұрын
sure!
@vigneshramachandran2481
@vigneshramachandran2481 4 жыл бұрын
Hi, The Video is very helpful. I was wondering how do we extract data from another workbook using the same VBA Macro. As, i have a shared file and macro's cannot be enabled on a shared excel file i have created a similar one to and a added a master sheet to it., now need to select the source from the shared file.
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Hi Vignesh, Thanks for watching and sharing your requirement. There is one more tutorial, I have uploaded to combine multiple workbooks. And you are absolutely right that shared files are tough to consolidate through VBA.........
@vigneshramachandran2481
@vigneshramachandran2481 4 жыл бұрын
Excel Destination thank you very much, i will go through them as well. 👍🏽
@srikanthc2348
@srikanthc2348 4 жыл бұрын
Could you please share me the code for consolidate the data in to a single file
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Let me check, if I have the original file
@chaitanyasarmavangala2705
@chaitanyasarmavangala2705 4 жыл бұрын
Excellent and very easy to understand. Can I have a code, where I have four files with similar data and all those to be combined into a single sheet in the fifth file?. Please
@wongpeggy4363
@wongpeggy4363 4 жыл бұрын
dear sirs, may I have the code
@ashishshukla731
@ashishshukla731 Жыл бұрын
This code is giving me header again and again. How to remove the same headers and get only one instead along with data
@soumen535
@soumen535 4 жыл бұрын
Sir plz tell me how can create i the command button
@ExcelDestination
@ExcelDestination 4 жыл бұрын
pls check out the following tutorial for adding a command button and assigning any code to command button : kzfaq.info/get/bejne/i5qcmZB4s5avg6M.html
@enocharthur1955
@enocharthur1955 3 жыл бұрын
Can you please reply me with the vba code so I use it?
@ExcelDestination
@ExcelDestination 3 жыл бұрын
let me check, if I have the original file still with me.
@vikramkanda757
@vikramkanda757 3 жыл бұрын
How do I limit to only 4 columns?
@ExcelDestination
@ExcelDestination 3 жыл бұрын
some additional code would be required.
@ia929
@ia929 3 жыл бұрын
Can you show an example of consolidating same sheets but from multiple spreadsheets?
@ExcelDestination
@ExcelDestination 3 жыл бұрын
you mean same sheet from multiple files ?
@ia929
@ia929 3 жыл бұрын
@@ExcelDestination yep, consolidating from different excel files. In this sample, the tabs are from a single excel file
@avantikaanshu4438
@avantikaanshu4438 3 жыл бұрын
useful but has some problems. Like entering/adding data even for repetitive/similar customer or product Id which it should not. It should only update existing data for same id and not make fresh entry in new row for same Id. Data validation required If you can help out
@ExcelDestination
@ExcelDestination 3 жыл бұрын
there would be some different code required
@PeggywongPeggy
@PeggywongPeggy 4 жыл бұрын
may I hv the code
@rrwork4826
@rrwork4826 3 жыл бұрын
i have error this code sir please help out
@ExcelDestination
@ExcelDestination 3 жыл бұрын
Please send me your code at exceldestination@gmail.com
@Sachin19831000
@Sachin19831000 5 жыл бұрын
I want learn VBA language please suggest.
@ExcelDestination
@ExcelDestination 5 жыл бұрын
if you are interested in online learning, I can teach you...send your email address and mobile at exceldestination@gmail.com
@sunilchoudhary6007
@sunilchoudhary6007 3 жыл бұрын
PLS SHARE PRWCTICE FILE
@menakahiremath4097
@menakahiremath4097 4 жыл бұрын
Hi, I went through this tutorial and very useful. However, i have additional queries, and i have sent you an e-mail. Please could you look into it and help me.
@ExcelDestination
@ExcelDestination 4 жыл бұрын
ok, let me check
@menakahiremath4097
@menakahiremath4097 4 жыл бұрын
@@ExcelDestination Hi, Did you get a chance to look into my e-mail query?
@preetdoshi4053
@preetdoshi4053 2 жыл бұрын
Firstly I don't even have basic knowledge of Excel or coding so excuse me my doubt is silly So, I am getting "error 1004, Select method of Range Class failed" Now, where did I go wrong?
@user-ix9hb7je4lGaurav
@user-ix9hb7je4lGaurav 4 жыл бұрын
If I want to avoid two sheets
@ExcelDestination
@ExcelDestination 4 жыл бұрын
you can use if condition to avoid two sheets name. for specific code, you can always send me email at exceldestination@gmail.com
@user-ix9hb7je4lGaurav
@user-ix9hb7je4lGaurav 4 жыл бұрын
Excel Destination I have sent the email to you , pls resolve this
@kunalDking
@kunalDking 6 жыл бұрын
How consolidate only the heading from multiplesheet into one sheet ? Plz help
@ExcelDestination
@ExcelDestination 6 жыл бұрын
Thanks kunal for watching! you have to use less code than explained in this tutorial...send me your file at EXCELDESTINATION@GMAIL.COM...I will respond over the weekend...
@soumen535
@soumen535 4 жыл бұрын
Sir plz tell me how can i creat this comman button
@archanaaa2514
@archanaaa2514 4 жыл бұрын
I dint understand this code sir, I am a beginner to vba code. Plse give some easy tips to learn vba code
@ExcelDestination
@ExcelDestination 4 жыл бұрын
Yes actually it is a little advance VBA Code. But, you keep learning continuously. After some time, it would seem easy to you.
@archanaaa2514
@archanaaa2514 4 жыл бұрын
@@ExcelDestination okay. Sir how to practice vba code? like seeing in google den copying it. Will that method workout? How to remember coding lines exactly.
@theintrovertguy2261
@theintrovertguy2261 Жыл бұрын
This video just shows the syntax, but not explained the use of few of the lines which are important and basic to explain.
@gpapatheod8028
@gpapatheod8028 3 жыл бұрын
IT DOES NOT WORK
@MukeshSingh-ts2xn
@MukeshSingh-ts2xn 3 жыл бұрын
Code is good but u couldn't able to describe it well
@rikardosiahaan7782
@rikardosiahaan7782 2 жыл бұрын
SUBCRIPT OUT OF RANGE!!!
VBA to Remove Duplicate Rows - Excel VBA Tutorial by Exceldestination
13:22
AWESOME Excel trick to combine data from multiple sheets
7:27
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 34 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 85 МЛН
Consolidate Data from Multiple Excel Workbooks using VBA
10:32
Dinesh Kumar Takyar
Рет қаралды 160 М.
Excel VBA To Copy Data From One Sheet To Another (BEGINNER TO PRO!)
11:46
Tiger Spreadsheet Solutions
Рет қаралды 98 М.
Excel VBA Code to Copy Paste if Multiple Conditions are Met
11:31
Excel Destination
Рет қаралды 57 М.
Watch these 28 minutes if you want to become an Advanced VBA user...
29:01
Excel Macro Mastery
Рет қаралды 51 М.
VBA to BROWSE & COPY Data from SELECTED File in Excel
10:00
Leila Gharani
Рет қаралды 325 М.
Excel Macro to combine multiple Excel Workbooks
7:45
Ajay Anand
Рет қаралды 26 М.
Consolidate Multiple Files based on Column Headers in VBA
24:59
Level Up Excel Skill
Рет қаралды 10 М.
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 34 МЛН