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

preview_player
Показать описание
This excel vba tutorial explains, VBA Macro to consolidate data from multiple sheets. MS Excel has excellent capability with VBA to transfer data quickly from multiple sheets. We can use for loop with if condition in vba to develop vba code for data consolidation.
Рекомендации по теме
Комментарии
Автор

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 :)

rafaelmartinezoliva
Автор

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!

AkaExcel
Автор

This is great, thanks Excel Destination! :)

jonasandresen
Автор

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


lastrow = Worksheets("Console").Cells(Rows.Count, 1).End(xlUp).Row

+ 1, 1).Select
ActiveSheet.Paste
Next
End If
Next

End Sub

kishangzp
Автор

Thank you, you made it easy to follow. My understanding is the codes copies each row and not a block of cells.

MM-oeeo
Автор

That is stunning. Thank you so much for sharing this truly useful video. 👏 🌟 🌟 🌟 🌟

sasavienne
Автор

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?

hiprateek
Автор

Thank you very much for this great video and this simple explanation

MohAboAbdo
Автор

it is really good make my works super fast. only keep asked me to make a copy for every worksheets

wongpeggy
Автор

How to exclude more sheets instead of only the mastersheet is excluded?

jzngyi
Автор

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

lifeofcommonmanvlog
Автор

Thank you, I was able to get this to work. One quick question, how do I exclude to worksheets?

ericasimmons
Автор

why you don't use
for each ws in thisworkbook.worksheet

bharatdocuments
Автор

very good sir plz make a video with real job projects base there all condition

vijaysahal
Автор

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.

brendaoberholzer
Автор

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

anirudhghosh
Автор

Can i used this code if the header of columns is different

divyanivalkar
Автор

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?

Joda-esxd
Автор

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

chaitanyasarmavangala
Автор

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?

anhnhatnguyet