Automate Copying of Column Data from Sheet to Sheet Using Excel VBA

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024
  • How to automate copying of column data from one worksheet to another using Excel VBA.
    Complete code and sample file available here:
    www.exceltraini...
    Get the book Excel 2016 Power Programming with VBA: amzn.to/2kDP35V
    If you are from India you can get this book here: amzn.to/2jzJGqU

ความคิดเห็น • 403

  • @philipnerimaligjr5189
    @philipnerimaligjr5189 6 ปีที่แล้ว +4

    hi Sir! I just want to say thank you for your very helpful tutorial, it really help me a lot specially to my work and reports.MABUHAY!!

  • @riahmacasait235
    @riahmacasait235 ปีที่แล้ว

    I been searching this kind of turtorial, after 9 mos. I found it.. wooohhhh❤❤❤ thank you so much, this is very useful..🎉🎉😊😊😊

  • @jasminevicencio1716
    @jasminevicencio1716 5 ปีที่แล้ว

    Incredibly thorough and easy to follow. Thanks so much!!!

  • @nazimansari1797
    @nazimansari1797 8 ปีที่แล้ว

    Thanks Dinesh ji,
    I am facing problem to copy data with specific data and after watching your videos problem has been resolved and now i am free to do my task with in a minute. Thanks again for your efforts and solute you too.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      Glad that you were able to solve your problem!

    • @nazimansari1797
      @nazimansari1797 8 ปีที่แล้ว

      Dinesh ji, I have another issue with the same sheet. I am able to copy data from master sheet to all but next time when i update master sheet again all data copied again. Can i copy only updated data or new data with existing data. Means ovrwrite or else.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      You can first clear the earlier data. The last lines of code in this link will help: www.exceltrainingvideos.com/automate-search-display-print-archive-data-with-excel-vba/

    • @nazimansari1797
      @nazimansari1797 8 ปีที่แล้ว

      Thanks sir ji this is not exact with my expectation but we can work with it.

    • @nazimansari1797
      @nazimansari1797 8 ปีที่แล้ว

      I have created two task here first clear all data from all sheets and then start copy data through VBA. If we having any other option to copy only new changes in the sheets with existing data comparing it will help us.

  • @Msdkash
    @Msdkash ปีที่แล้ว

    Thank you sir. This code solved my big problem.

  • @zingfam7616
    @zingfam7616 ปีที่แล้ว

    Thank you. This is very useful for me, the only thing, i would like to know if for example for filter coloum, instead of name, if i want to select all dates and ignore nil, what code i should i use. Because the date has various dates so i can't use your code. Thanks for your help.

  • @XilofeneSOR2
    @XilofeneSOR2 7 ปีที่แล้ว +1

    Hello, nice video. What if you want to especify on the macro the column header name, instead of having column 1, 2, etc.?
    Which code would you use?
    Thanks!

  • @BrendaMalone
    @BrendaMalone 9 ปีที่แล้ว +1

    Hello sir. Thank you for the video. It is great. I do have a question about an UPDATE button. Let's say that I have set up everything correctly and my UPDATE button works fine to transfer row of information from Sheet A to Sheet B.
    Okay. After I update, the next day I have another entry for sheet A. Now, when I push update, will ONLY the new information be transferred? Or will ALL of the information copy over itself?

  • @dianaheppner2766
    @dianaheppner2766 3 ปีที่แล้ว

    Very helpful...almost solves my problem...Can you reference a criteria cell instead of hardcoding in the criteria. I need to be able to pull data for a specific date. I want my user to be able to change the date in a field and have the macro look at that date cell to pull the rows that meet that date field. Is that possible?

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      Of course! This link will guide: www.exceltrainingvideos.com/refer-cells-using-index-numbers-vba/

  • @DjAurelius
    @DjAurelius 8 ปีที่แล้ว

    Hi there!
    First of all I would like to thank you for all the Excel tutorials. I have gained a lot of new Excel knowledge through these tutorials.
    I have a question regarding this code. Is it also possible to sort multiple "states" to multiple worksheets? I have tried multiple things, but I couldn't get it workable.
    Do you have any advice how I could solve this?

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +DjAurelius Can you elaborate with an example?

    • @DjAurelius
      @DjAurelius 8 ปีที่แล้ว

      +Dinesh Kumar Takyar Thank you for your quick respond.
      As an example. Now the data for Maharashtra is copied to sheet 2. But what if I want to copy the info of Delhi to sheet 3 and Tamilnadu to sheet 4?

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +DjAurelius These two links might help:
      www.exceltrainingvideos.com/copy-data-from-one-workbook-to-another-to-a-specific-worksheet/
      www.exceltrainingvideos.com/tag/copy-paste-data-to-specific-worksheet/

  • @godfreykatsande8452
    @godfreykatsande8452 7 ปีที่แล้ว +2

    Im working with named work sheets eg Capture form, Province, district etc . when i apply the code, im getting a "Runtime error 424 'Object required'. it only works with default sheet names

  • @IFLocation-2025
    @IFLocation-2025 8 ปีที่แล้ว

    Awesome! Thank you for this. Very helpful and well presented.

  • @sunilsharma15
    @sunilsharma15 9 ปีที่แล้ว

    Thanks Dinesh for your quick and easy help. Just need to know how to add option to mention parameter required in command button i.e. rather than editing code to look for maharashtra, use get option to type maharashtra when pressing command button.

  • @rakeshkumarmadella7955
    @rakeshkumarmadella7955 7 ปีที่แล้ว

    How do I matching statement using VBA... will paste both the statement together on the same page.. and giving matching statement formula.. like if(countif(Range=&cell)=1,"^","x")How do I remove the common values.. and remove the older lines and add the new lines... I need your help on this please.. your videos are really awesome... thank you so much for your valuable I really appreciate it...

  • @LegacyMensa
    @LegacyMensa 9 ปีที่แล้ว

    Hello really nice video Mr Dinesh.My question is with this program can i choose a specific cell data and copy it in one cell in the other sheet?not copying all going from a verification first.It means that when i'll click on the name for example, the macro when executed will copy the name to a cell in the other sheet.

  • @gchacon316
    @gchacon316 7 ปีที่แล้ว

    Dinesh, thank you for sharing so much information with everyone on TH-cam. What I would like to do is copy multiple names from column 1 (Like Ethan, Ali and Alexis) onto another sheet. Can you help?

  • @kaviendrasingh1281
    @kaviendrasingh1281 6 ปีที่แล้ว

    Thank you for this and your all the videos.

  • @ericvanreck4686
    @ericvanreck4686 2 ปีที่แล้ว

    Hello Mr Dinesh
    The method to Automate Copying of Column Date from Sheet to Sheet Using Excel VBA was very helpful
    However, if the Data to be copied contains formulas it does not work properly
    I wonder if there’s a way to paste the data as Values?
    Perhaps you have the answer

    • @Exceltrainingvideos
      @Exceltrainingvideos  2 ปีที่แล้ว

      Try paste special. This link will guide:
      www.exceltrainingvideos.com/paste-special/
      www.exceltrainingvideos.com/copy-data-paste-another-workbook-transpose-automatically-using-excel-vba/

  • @psgoldberg
    @psgoldberg 8 ปีที่แล้ว

    While the video shows techniques for selecting ranges, if you want to actually solve this problem, the Advanced Filter does it very simply, including the conditional logic. Automating it is one line of code.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +Paul Goldberg th-cam.com/video/TZptQpmW2Xs/w-d-xo.html

  • @FlyinGDroiD
    @FlyinGDroiD 4 ปีที่แล้ว

    thank u sir and one more help needed how can paste same text or name in any cell by double click option ??? how to write macro for it

    • @Exceltrainingvideos
      @Exceltrainingvideos  4 ปีที่แล้ว

      You can use the Worksheet_BeforeDoubleClick event:
      Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
      'code goes here
      End Sub

  • @hollidaymtg
    @hollidaymtg 6 ปีที่แล้ว +1

    seems like alot of people are have the same problem and it as simple as typing out the code as seen in the video. I think everyone's code will work if they place a " : " after the word "DESTINATION" , it should be DESTINATION:= OR Sheet1.Paste Destination : =Worksheets("sheet2").Cells(erow,2 )

  • @numb7r
    @numb7r 4 ปีที่แล้ว

    Awesome!! much appreciated - you saved me a lot of time with this

  • @akahn8311
    @akahn8311 3 ปีที่แล้ว

    Thank you very much for your videos, they are extremely helpful.
    I have a question, how can i copy the cell value only. I have formulas in the cells and i want to copy and paste into sheet 2 without formulas, could you please advice how to edit the code to do achieve this. Thanks for your time much appreciated.

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      Assume we are copying data from cell c1 in sheet1 to cell c1 in sheet 2 and the data in sheet1 is the result of a formula:
      Sheet1.Range("C1").Copy
      Sheet2.Select
      Range("C1").Select
      Selection.PasteSpecial Paste:=xlPasteValues

    • @akahn8311
      @akahn8311 3 ปีที่แล้ว

      ​@@Exceltrainingvideos Thank you for your reply and your time, much appreciated.
      Is there a way to use ".cells(i,1)" function and not the function ".Range("C1")
      For e.g. --> Sheet1.Paste Destination:= Worksheets("Sheet2").Cells(erow,1).PasteSpecial Paste:=xlPasteValues --> this is modification of the vba code from your video above.
      I have to use a for loop and and the way you designed the logic of the vba code in the above video exactly fits my application case. With the ".Range" function I dont know how to integrate the variable "i" from the for next loop, on the contrary the ".cells(i,1)" funtion is best suited to work with for next loop.
      I am trying to find a possibility to modify the ".Paste Destination" function implemented in your vba code as it works perfectly with ".cells" funtion which in turn works perfectly with for next loop. The idea is to modify it in such a way that any possible format is omitted that is to say only the value from the cell is extracted or copied and pasted into sheet 2
      Thank you for your advice.

  • @covarontablet862
    @covarontablet862 7 ปีที่แล้ว

    Can you please show how to got the copy data button to work before you altered it for only specific data?I need my button to do exactly what yours did at the start of this video. Thanks!

  • @davidlee1387
    @davidlee1387 7 ปีที่แล้ว

    Thank you sir. Your tutorials have been really helpful. I am using one of your codes but coming up with a problem when I want the data copied to Sheet2 Columns 16,17,18 instead of Columns 1,2,3. The code works fantastic as is but I need to have the data go into a specific columns on Sheet2 - which on my end is a Dashboard with charts and summary data from sheet1.
    What I'm seeing on my end is that it will complete the first "Due" that the macro sees but will stop and not include the other rows that are "Due"
    Sub copycolumns()
    Dim Lastrow as long, erow As Long
    Lastrow=Sheet1.Cells(Rows.Count, 1). End(xlUp).Row
    For i=2 To Lastrow
    If sheet1.Cells(I,6)= “Due” Then
    Sheet1.Cells(I,1).Copy
    Erow=Sheet3.Cells(Rows.Count, 1).End(xlUp).Offset(1,0).Row
    Sheet1.Paste Destination:= Worksheets(“Sheet2”.Cells(erow,1)
    Sheet1.Cells(I,3).Copy
    Sheet1.Paste Destination:= Worksheets(“Sheet2”.Cells(erow,2)
    Sheet1.Cells(I,6).Copy
    Sheet1.Paste Destination:= Worksheets(“Sheet2”.Cells(erow,3)
    End if
    Next i
    Application.CutCopyMode=False
    Sheet2.Columns(). AutoFit
    Range(“A1”).Select
    Please help! Thank you in advance

  • @lequylong3731
    @lequylong3731 8 ปีที่แล้ว

    thank you for yr video. could you make videos to guide about array in vba and how to apply it ? many thanks.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      Have a look at this web link: www.exceltrainingvideos.com/populate-listbox-on-user-form-using-arrays/
      You may also like to do a search at exceltrainingvideos.com

  • @maxkth75
    @maxkth75 8 ปีที่แล้ว

    Hello again!
    Now it runs ...
    Thank you very much, Sir!

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +Sebastian Hashimi Great that you got the macro running!

    • @aramhussein504
      @aramhussein504 8 ปีที่แล้ว

      +Dinesh Kumar Takyar
      Hi Sir, could you explain how you solved the issue, since i am also experiencing the same issue.
      Many thanks in advance!

    • @sirrockyfela
      @sirrockyfela 8 ปีที่แล้ว

      +Dinesh Kumar Takyar What if i add a new row of entry in sheet 1 and i want it to automatically update the selection in sheet 2 without repeating the entire previous selection already copied to sheet 2.

  • @dantecunningham9425
    @dantecunningham9425 7 ปีที่แล้ว

    Thank you for the video. If I want to take information from multiple sheets and add them to one sheet? How do I do that? For example, 6 department budgets that roll up to a master budget; each budget will have expenses added on a rolling basis. Thank you for your help.

    • @Exceltrainingvideos
      @Exceltrainingvideos  7 ปีที่แล้ว

      This link will help: www.exceltrainingvideos.com/how-to-transfer-multiple-rows-of-data-from-multiple-workbooks-into-master-workbook-with-vba/
      Or do a search at: www.exceltrainingvideos.com

  • @SERAJ9156
    @SERAJ9156 9 ปีที่แล้ว

    Thanks for your great videos but still can you please help me out in Copying data from specific column and pasting it on other sheet column beside column. I don't want to paste date in the next empty row but I want to paste data in the next empty column. So many videos I saw but unable to find the solution.

  • @shyamthakur1156
    @shyamthakur1156 6 ปีที่แล้ว

    Sir very useful videos .....can you share some video for pivot creation

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      th-cam.com/play/PLFoKoDG_7gtJbKNbtOxqvPlTg2Dyvzqus.html

  • @ramdasthorat3165
    @ramdasthorat3165 3 ปีที่แล้ว

    Very nice video sir lekin copy button & other buttons userform se kaise opret/use karenge

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      Please search this channel or my website www.exceltrainingvideos.com

  • @GoldenBearAlum2012
    @GoldenBearAlum2012 8 ปีที่แล้ว

    Hello Sir,
    I want to start by saying thank you for your well presented videos. They are extremely helpful. My question is, is there a way where I can transfer information to the next available column? This way instead of having one long cell of information I can have it broken down into shorter and more concise columns. Thanks.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว +1

      This line of code will find the next blank column:
      eColumn = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column

    • @GoldenBearAlum2012
      @GoldenBearAlum2012 8 ปีที่แล้ว

      Thank you sir

    • @brysongannon8076
      @brysongannon8076 3 ปีที่แล้ว

      You all probably dont care at all but does someone know a tool to get back into an instagram account?
      I stupidly lost the account password. I love any assistance you can offer me.

  • @thu5648
    @thu5648 8 ปีที่แล้ว

    Hi Sir, Thank for your video.
    I have a question for you. I want to copy the first row title from sheet 1 to sheet 2, and then whenever I insert or delete a column in that title row in either sheet 1 or sheet 2, the other will automatically insert or delete that column for me. Can you help me with that?

  • @sambhattias
    @sambhattias 7 ปีที่แล้ว

    Hello Mr. Dinesh Kumar Takyar,
    I am Sam Thank you sir your tutorials have been really helpful. Sir I have question please help me. I automate copying of column data from Sheet1 to Sheet2. now I want to do same formula in sheet3 and sheet4. Just like sheet2 automate generate "Maharashtra" sheet3 generating "Tamilnadu" and sheet4 "Delhi" on just one click.
    please sir I am very great full to you
    do this same as soon as possible.

  • @alok2807
    @alok2807 9 ปีที่แล้ว

    Very Nice & Simple code.
    Hello Sir,
    I have one difficulty while changing entire row font color, I have a shared worksheet which have limitation to not write the macro and disabled the formatting colors options in which we have maintained the due dates information by date wise deliverable item like:
    if due date = 03/15/2015 16:00 PM (US/Date/Time), now we have to automate the like which item is due today, tomorrow and "Have more time" with red color for due today and some other color for tomorrow etc..
    Please advise and help.

  • @surrey33
    @surrey33 9 ปีที่แล้ว

    Hi Dinesh Thanks for your video!! In this example you have only 6 variables so u know wat all the cells to copy.
    Say for example we have 140 variables out of that 40 variables we need to copy and paste and every time position of the variable headers are not fixed ( product may come in 1 st column r 100 th column) in this seario we need to find the variable and the copy and paste right so hhow to go about it ?? using looping

  • @MrNareshbansal75
    @MrNareshbansal75 8 ปีที่แล้ว

    hello
    i need this same but without button action. it should be done as we enter data in to cell automatically and individually. ??
    plz help me

  • @iambashuygen
    @iambashuygen 6 ปีที่แล้ว

    Hello!Great video. Is it also possible tot let the workbook first find out if the line isn't already existing?Let's say the first collumn is number 11220, when copying to the other workbook it first search for this number and then place it on that line.

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      Of course. You can use 'countif' to check whether the data being copied is a duplicate.

    • @iambashuygen
      @iambashuygen 6 ปีที่แล้ว

      What is the best way to fill this in using VBA?

  • @rhyanndejuan4600
    @rhyanndejuan4600 7 ปีที่แล้ว

    Thank you it helps me a lot, but i have few questions what if the states or city and sheet number are variable, what would be the code in VBA, sorry I dont know how to code VBA. thanks in advance..

    • @Exceltrainingvideos
      @Exceltrainingvideos  7 ปีที่แล้ว

      Have a look at www.exceltrainingvideos.com for learning VBA.

  • @questioneverything9274
    @questioneverything9274 8 ปีที่แล้ว

    I would like to automatically copy data from sheet 1 to sheet 2. I want to copy the data from a cell on sheet 1 that spans 30,31 j,k (sorry, you might describe it as 30j -31k) into cell c2 on sheet 2. Thank you.

  • @rameshp4311
    @rameshp4311 8 ปีที่แล้ว

    HI Sir,how to add multiple specific names to copy or to provide range of names to copy data

  • @panshy7445
    @panshy7445 9 ปีที่แล้ว

    How about if i want to copy all column but only a 3 records, to different sheets? Say i have 4 people to divide records in sheet one between. How can i copy all columns, 3(records) rows each, and paste in different sheets for the people the have?

  • @kananmehta
    @kananmehta 7 ปีที่แล้ว

    hello Dinesh Sir...Love all your videos...I have combo box control for selecting months in main worksheet...if I select January all the data should go in Jan worksheet automatically and if select Feb. month ,all the data should copied in Feb worksheet? How can i do it?

    • @Exceltrainingvideos
      @Exceltrainingvideos  7 ปีที่แล้ว

      Do a search at www.exceltrainingvideos.com

    • @kananmehta
      @kananmehta 7 ปีที่แล้ว +1

      which video should I look?

  • @azainuri4766
    @azainuri4766 5 ปีที่แล้ว

    thank you for this tips very usefull.
    but how if I just want to copy value from sheet1 to another sheet ?
    because the result if I use this method is like copy paste all including cells format.
    thanks for help

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      This link will help. Instead of using 'Paste' we use 'PasteSpecial':
      www.exceltrainingvideos.com/tag/generate-reports-automatically-in-excel-using-vba/
      Eg.:
      Worksheets("Sheet1").Range("A1").Copy
      Worksheets("Sheet2").Range("D2").PasteSpecial Paste:=xlValues

  • @amayrajoshivlogs
    @amayrajoshivlogs 2 ปีที่แล้ว

    Hello Sir, I am very impressed with your videos. It is very helpful for us.
    Sir I need your help, have tried this code for my use but facing some error in this.
    Can you please guide me on this ? It means a lot for me sir.
    How can i contact you ?

  • @miibos
    @miibos 8 ปีที่แล้ว

    if I only want to copy columns which I marked to be copied ( # of columns can vary) instead of a fix range. what do I do? thanks!

    • @miibos
      @miibos 8 ปีที่แล้ว

      btw. your videos are awesome! I have learned so much

  • @alihasan7067
    @alihasan7067 5 ปีที่แล้ว

    Thanks again Mr. Kumar for this video, but what if the Headers on both sheets are changing from time to time, how can you apply the (find) method instead of fixed (range) (cell) or can the headers values that need to be found put in a collection (which contains the headers wanted) then search for it and copy from first sheet then again search on next sheet and paste

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว +1

      It's only the column numbers that matter.

    • @alihasan7067
      @alihasan7067 5 ปีที่แล้ว

      @@Exceltrainingvideos yes, but for example what if header first name next month changed from column 1 to column 6 in sheet 1 and changed from column 1 to column 4 on sheet 2 and you don't need to change the code every time the header is changing between columns so how to apply the find method between the two sheets

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      Putting headers into a collection is a brilliant idea.

  • @pransriblogs5620
    @pransriblogs5620 5 ปีที่แล้ว

    Hi Sir,,
    I have a set of data in column B and I have to copy the contents and paste as row in another sheet. Can you please help me on this how to perform by Marco

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      These links will help solve your problem:
      www.exceltrainingvideos.com/methods-to-transfer-data-from-excel-worksheet-with-vba/
      www.exceltrainingvideos.com/transfer-transpose-data-from-one-excel-worksheet-to-another-using-vba/
      www.exceltrainingvideos.com/copy-data-paste-another-workbook-transpose-automatically-using-excel-vba/
      www.exceltrainingvideos.com/transpose-data/

  • @ritzheist
    @ritzheist 5 ปีที่แล้ว

    Hello! Can you help me on this? This is regarding stock trading. If a cell value is 'sell or buy' then it should automatically record the stock's (live current price). And after a while when 'sell or buy' disappears (cell value is empty) it records the changed current price into another cell beside previous record. For example suppose the price keeps changing over a period of time, lets say cell A1 value is Sell/Buy and the price (Cell B1) is 235, so it records 235 and put it in cell C1. After some time if the A1 is empty and B1 value is 200, then it should paste 200 in D1. That means we will have two price C1=235 and D1=200. It should be automated "No button to click" via macro. Is it possible?

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      Use a 'TIMER'. This link will help: www.exceltrainingvideos.com/how-to-create-timer-counter-using-excel-vba/
      Or search www.exceltrainingvideos.com

  • @sagarbajracharya4666
    @sagarbajracharya4666 6 ปีที่แล้ว

    Dear Sir,
    As you said in the tutorial, I did even though it is not working, it shows yellow highlighted in Sub copycolumns(). what wrong I did in writing a code?

  • @Ekeoeoqssn
    @Ekeoeoqssn 6 ปีที่แล้ว

    Hello! Could you please advice how to paste data to arbitrary line? For example I need to start paste from "B4". Many thanks in advance.

    • @Ekeoeoqssn
      @Ekeoeoqssn 6 ปีที่แล้ว

      I did it. I add "If erow = 2 Then erow = erow + X" to the cycle, where x - number of lines you want to move down.

  • @adodixn7040
    @adodixn7040 4 ปีที่แล้ว

    Thank you boss for this, but how do i format the code to copy column A in sheet one to column C in sheet 2 and something like that

    • @Exceltrainingvideos
      @Exceltrainingvideos  4 ปีที่แล้ว

      www.exceltrainingvideos.com/automate-copying-excel-column-data-from-sheet1-to-sheet2-with-vba/

  • @viribusgym2216
    @viribusgym2216 5 ปีที่แล้ว

    hello, i want to ask you about the automatically Update Inventory , if i have list including formula, how can i make a clear without deleting formula?
    Thank you

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      Sub RemoveConstants()
      Dim myConstants As Range
      Set myConstants = Sheet1.Range("A1:B3").SpecialCells(xlCellTypeConstants)
      On Error Resume Next
      myConstants.ClearContents
      End Sub

  • @ingrid466
    @ingrid466 9 ปีที่แล้ว

    Hello Sir. Thanks for the video, but I need help, I don't know what I'm doing wrong but the micro is only copying the last row. Please help

  • @tarekererajeeva3917
    @tarekererajeeva3917 2 ปีที่แล้ว

    Very good sir thank you

  • @AC-tb9eo
    @AC-tb9eo 9 ปีที่แล้ว

    Hi there! Your videos are great and very helpful, but I have a data set that I am struggling with currently. I am trying to copy info from a master list to a new sheet based on certain criteria, but I have ~10 different "criteria" that I want to use... do you have an email address that I can contact you or send you the file as an example? Any help is greatly appreciated! Thank you in advance!

  • @nitinc2373
    @nitinc2373 6 ปีที่แล้ว

    Dear Sir,Greeting of the Day,Its very nice & useful also,but i have a problem when i enter some new data in sheet 1 and click on copy data then all data which is in sheet1 is again copy to sheet 2 below the first copied data.means same data again copy with new entry,Please help me out. Thanks.

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      You should clear the data in sheet2 before copying all the data again from sheet1.

  • @hossammohamed7096
    @hossammohamed7096 7 ปีที่แล้ว

    Hello
    I need a Vba code to copy cells written in red color from a sheet called Template in column E to another sheet called "Data" in column A. I need the values to be added in column A after the last record

  • @fahadfalak8934
    @fahadfalak8934 8 ปีที่แล้ว

    Hello Sir, i am facing a problem while using Macro Copy Data function,i might not able to fully convey my problem but i will try,i am currently managing payroll and i want my data to be segregated automatically from main sheet to my online salary(Bank Account)to pick only cells and their corresponding values if bank account number is entered and same for Cash Salary(Don't have bank account).i would like to share my sheet so that i could get better understanding if it is possible.

  • @NabeelaVan94
    @NabeelaVan94 7 ปีที่แล้ว

    How would you do this if you have Column A-T on sheet 1, but A-P on 2nd sheet. And you want the data to copy over but the columns are mismatched as in Column A on Sheet 1 is Column D on Sheet 2 etc. Everyday new data will be put on Sheet 1 and you want Sheet 2 to automatically populate specific columns (w/o any special conditions)?

    • @Exceltrainingvideos
      @Exceltrainingvideos  7 ปีที่แล้ว +1

      Search www.exceltrainingvideos.com

    • @NabeelaVan94
      @NabeelaVan94 7 ปีที่แล้ว

      Dinesh Kumar Takyar​ I'll take a look at this ty :)

  • @rahim8682
    @rahim8682 8 ปีที่แล้ว

    i am doing inventory for my bar"how to automate copy closing rows as opening in the next sheet which are in numbers..

  • @choprasumant
    @choprasumant 9 ปีที่แล้ว

    dear sir , how can i copy specific columns from one excel to some specific columns in another excel , means for example how to copy column b from one excel to column a of another excel automatically

  • @21manishgupta
    @21manishgupta 7 ปีที่แล้ว

    Dear Sir,
    What if I have a drop down on sheet 1 where in I can select the state. and based on the selection when i press the copy data button, only the data for that state is moved.
    In your case, you have coded Maharashtra in your VB code... but instead if I want to rather reference that value to a cell on sheet1... how do we do that sir?
    Please advice.
    Thanks,

  • @Zach9208
    @Zach9208 6 ปีที่แล้ว

    Is there a way to copy and paste matching column headers from two workbooks with multiple tabs and consolidate them to one single workbook? It looks like your code just does this for one sheet. I need to copy and paste matching columns from the source tabs to one single destination workbook. I would need the loop to detect where the last row was pasted to the destination tab and resume pasting data.

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      Question not quite clear. Do you wish to copy the headers only or data in columns?

    • @Zach9208
      @Zach9208 6 ปีที่แล้ว

      So let me rephrase. I have 2 source workbooks with multiple sheets and 1 destination sheet. The destination sheet has a bunch of columns with formulas. Row 1 contains the headers for all 3 workbooks. The sheets within the source files have a different combination of columns. The destination workbook has one sheet that I am looking to consolidate all of the date on. I need a macro to take all of the data from the matching columns between the source and destination books. It would need to be a loop and need to use xldown to detect where previous data left off and keep pasting as the macro looks through the other worksheets. Not sure if this is even possible... I must say it is super messy and I am inheriting the problem. So the headers would already be in the destination sheet in row 1.

    • @Zach9208
      @Zach9208 6 ปีที่แล้ว

      Even if it were semi automated macro process where I run the macro for each active sheet with the source workbooks and it pastes starting in the next blank row of the destination sheet in a separate workbook would be a win for me. I would then just keep changing tabs of the source spreadsheets. Right now I manually copying atleast 20 different columns from the source files and then pasting them for each sheet from the source.

  • @rishabhrajshetty3274
    @rishabhrajshetty3274 6 ปีที่แล้ว

    Hello Sir, I have quite a complex problem statement that I need to resolve using VBA and I need your help. The task is to copy multiple ranges from a sheet in an excel workbook and paste it into several different ranges on a sheet in one excel master workbook. This copying process has to be repeated for 6 other workbooks and paste the data into the master workbook.The structure of all the source workbooks is the same.The problem is that in the master workbook, there are rows in between the paste ranges which consist of Formulae and are not a part of the copy-paste process. Is there any way I could send you the code that I have used for one single workbook so that you get an idea? Thank you.

  • @jpatra1000
    @jpatra1000 5 ปีที่แล้ว +1

    Hello Sir, I am getting the same error Run time error 424. object required

  • @AmitSharma-po1zb
    @AmitSharma-po1zb 5 ปีที่แล้ว

    Sir..my query is similar to this video..its just that the data should be copied to other worksheet skipping one row..pls help

  • @pavanvappangi753
    @pavanvappangi753 3 ปีที่แล้ว

    This is very helpful sir. But, how can i copy with coloumn names

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      These VBA tutorials in Excel will help: www.exceltrainingvideos.com/copy-column-data-automatically-from-excel-sheet1-to-excel-sheet2-with-vba/
      www.exceltrainingvideos.com/how-to-copy-column-data-into-another-workbook/
      Or search my TH-cam channel or website,

  • @TheGodisdj
    @TheGodisdj 7 ปีที่แล้ว

    awesome thanks very nice video ...

  • @pankajmishra2248
    @pankajmishra2248 5 ปีที่แล้ว

    Do you think the same will work if the data is filtered in the sheet 1?

  • @marviemanzo1495
    @marviemanzo1495 6 ปีที่แล้ว

    Hi, what if for example I have 3 tabs for each excel files and I only want one tab to be copied to the master file? How to do it? By the way I am using excel 2016 version. Thanks in advance!

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว +1

      www.exceltrainingvideos.com/copy-data-from-one-workbook-to-another-to-a-specific-worksheet/
      Or search this channel and this website www.exceltrainingvideos.com

    • @marviemanzo1495
      @marviemanzo1495 6 ปีที่แล้ว

      Thank you so muchhh

  • @MT4LYF
    @MT4LYF 8 ปีที่แล้ว

    Hi Dinesh
    Can you please help !!
    i have a lot of data in a sheet that needs to produce multiple lines of same data (e.g 2)
    original data comes like (e.g 1) and i need it to look like e.g 2 - without copy and paste - an automated function ?
    e.g 1
    SKU Description Qty
    A100 Soap 2
    A101 towel 3
    and so on...
    how can excel see the qty and reproduce the line however amount the qty shows
    e,g 2
    SKU Description
    A100 Soap
    A100 Soap
    A101 towel
    A101 towel
    A101 towel
    appreciate any help you can assist with
    Tom

  • @milindteli5280
    @milindteli5280 6 ปีที่แล้ว

    Hi Sir,
    How can i use if condition where i need to filter data with multiple data set like as per ur example State Maharashtra and New Delhi

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      If Sheet1.Cells(i, 6) = “Maharashtra” & Sheet1.Cells(i,7) ="New Delhi" Then
      do something
      End IF

  • @GauravSingh-lk4jd
    @GauravSingh-lk4jd 5 ปีที่แล้ว

    Hi sir,
    Can you teach us for how to prepare "Facility Management excel Sheet" which works automatically and pull data from many check lists....
    Revert awaiting...

  • @ganeshpullaganti9170
    @ganeshpullaganti9170 3 ปีที่แล้ว

    Thanks a lot Sir😊

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      So nice of you. Please share the Excel VBA tutorial with your friends too.

  • @rk-abc123
    @rk-abc123 6 ปีที่แล้ว

    Thank u very much Sir,
    Kindly guide me on d following.
    If we have sales details, of Jan to August in Sheet 1.
    After we advance filter them Sales representative wise in separate sheets.(John in sheet 2, Joe in sheet 3 and so on) if we add new sales of September to December in sheet 1 then how it (new sales) can auto update in concerned sales representative sheets. Please guide.

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      This link will guide:
      www.exceltrainingvideos.com/transfer-data-from-user-form-to-multiple-worksheets-in-excel-workbook-using-vba/

  • @sivakumarp9702
    @sivakumarp9702 8 ปีที่แล้ว

    Hi
    how to copy data in sheet1 of an excel book to outlook, using macro, request the simplest minimal #LOC, by the way your KT is very good
    Thanks

  • @imtyazbachu5339
    @imtyazbachu5339 7 ปีที่แล้ว

    hello sir, Like that video but now im having a problem.
    Im working with a dairy farm company and im dealing with over 15 sales men. nom i have 8 differnt packages and in a dailly basis i receive their stock out and in reports. Now im thinking of one files as that one above but for my 15 sales men with their stock out and back report that will be automatically updating.

  • @Foururii2c
    @Foururii2c 7 ปีที่แล้ว

    I have data on a sheet 1, single row 19 columns. I need to auto generate to sheet 2 without having to copy them manually. I have MS excel 2016

    • @Exceltrainingvideos
      @Exceltrainingvideos  7 ปีที่แล้ว

      www.exceltrainingvideos.com/methods-to-transfer-data-from-excel-worksheet-with-vba/
      Or do a search at www.exceltrainingvideos.com

  • @carlosandruth
    @carlosandruth 8 ปีที่แล้ว

    Hello Sir, Thank you so much for this very usefull tutorial. In this example you explained how to copy data only if the condition "Maharashtra" is met, but let's say that I also want to copy data if "Delhi" is met which is a condition in same column. How does the code needs to be modified? could you please help me? Thank you Sir in Advance.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +Carlos and Ruth Ramos Use 'AND' like so:
      If cells(i,2)="Maharashtra" AND cells(i,4)= "Delhi" Then

    • @carlosandruth
      @carlosandruth 8 ปีที่แล้ว

      Sir, thank you so much for the response. I tried to use the code you instructed however it doesn't copy the data. I noticed that for second criteria you wrote cells(i, 4) but I need the loop to go through same column and returned the values everytime it finds both in same column "Maharashtra" AND "Delhi".. any suggestions why you may thing this doesn't work? Thank you for your help!!

    • @sheronjeromjeyabalan4179
      @sheronjeromjeyabalan4179 8 ปีที่แล้ว

      I am having the smae problem, please sir could you guide? thank you in advance

  • @ARUNKUMARsnap
    @ARUNKUMARsnap 9 ปีที่แล้ว

    Thank you for sharing.

  • @neerajmaurya8440
    @neerajmaurya8440 4 ปีที่แล้ว

    we have a query can i change column data to another column data after using autofilter in vba

    • @Exceltrainingvideos
      @Exceltrainingvideos  4 ปีที่แล้ว

      Just try it out and share your experience with the TH-cam community. This link will also help: www.exceltrainingvideos.com/copy-auto-filtered-data-to-another-worksheet-automatically-with-vba/

  • @MohinU271
    @MohinU271 8 ปีที่แล้ว

    Hi Sir... Thank you such a nice video... However sir... I have a question.
    Suppose I have a column and each cell of that particular column contains six digits number... now I want to copy the cell which is stated with number 4.... I have tried with "If Sheets("Sheet1").Cells(i, 4) = 4*" but its not working ... Could you please help me to resolve that... Thanks in advance

    • @MohinU271
      @MohinU271 8 ปีที่แล้ว

      Sir... I found the solution with the code : If Sheets("Sheet1").Cells(i, 4) >= 400000 And Sheets("Sheet1").Cells(i, 4)

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      Great!
      Also have a look at theses links:
      www.exceltrainingvideos.com/bank-reconciliation-using-do-while-loop/
      www.exceltrainingvideos.com/copy-data-to-another-excel-workbook-based-on-criteria-using-vba/
      Or do a search at exceltrainingvideos.com

  • @arvindkesharwani7328
    @arvindkesharwani7328 6 ปีที่แล้ว

    Sir, I have a problem. I have generated a sheet1 where i have assign a formula in a specific column. I am using a lookup value in another sheet. as i change the value in sheet1 where i assign a formula the lookup value is also change. Sir, I want to know that which formula we use that as i change the value in sheet1 the lookup value will never

  • @shalinireddy194
    @shalinireddy194 4 ปีที่แล้ว

    Hello Sir,
    Thank you for sharing this video, need your assistance. I want to copy two states, apart from Maharashtra, Delhi as well from the same column. Help suggest me with the code sir.

    • @Exceltrainingvideos
      @Exceltrainingvideos  4 ปีที่แล้ว

      Use 'AND'

    • @rishithevalentine
      @rishithevalentine 4 ปีที่แล้ว

      Hello! Sir, this tutorial of yours was very useful. I’d like to know if there is a way, this works by us giving this specific city or string in a cell and it generates that specific data by clicking the button? Instead of changing the macro every time.
      Thanks in advance.

    • @shalinireddy194
      @shalinireddy194 4 ปีที่แล้ว

      @@Exceltrainingvideos Thank you very much for the reply sir! Sir can you suggest me any reference video on how use 'AND' function in this regard.

  • @abdullahquhtani8058
    @abdullahquhtani8058 6 ปีที่แล้ว

    I have a challenge for you here so this tutorial will be one of it’s kind.
    Why don’t you make the process interactive by giving the user the ability to choose which columns he wants to copy interactively? This can be done logically as follows:
    1- Make a table of two columns on a separated sheet i.e Dashboard sheet.
    2- Read all column headers of source sheet and write them in the first column of dashboard sheet.
    3- Populate checkboxes in the second column of dashboard sheet.
    4- Make VBA loop that reeds correspondents selected column headers and paste them in the destination sheet.
    I hope you got the idea and be able to apply it.

  • @debasismahapatro358
    @debasismahapatro358 8 ปีที่แล้ว

    Hi Sir,
    i have a data sheet with 33000 row items. i have written a VBA code to insert a new sheet as Output Sheet. now i want to copy the records with 4 conditions by useing the Autofilter option. i am able to put the autofilter but not able to put all 4 conditions in one go. conditions are like
    1. starting with DD
    2. anything with the key word DD
    3. Direct debit
    4. anything with the key word direct debit.
    please help me with the VBA code.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +debasis mahapatro This video might help: th-cam.com/video/TZptQpmW2Xs/w-d-xo.html

  • @harishmamidala6027
    @harishmamidala6027 7 ปีที่แล้ว

    Hi Dinesh .
    can you please help me out in by provinding the VBA code.
    Requirement :
    i have 4 excel files and 1 master file , so i need to copy specific(not side by side) colums data from 4 excel files to master excel file.
    can you please help me how to achive this

    • @Exceltrainingvideos
      @Exceltrainingvideos  7 ปีที่แล้ว

      Search www.exceltrainingvideos.com or my TH-cam channel.

    • @harishmamidala6027
      @harishmamidala6027 7 ปีที่แล้ว

      Hi Dinesh
      I have searched for all videos but i dint find any video related to my criteria . Can you please help me out

  • @kesavankesa3934
    @kesavankesa3934 4 ปีที่แล้ว

    What is the use of last line code range("A1"), please clarify

  • @fahimhadi5390
    @fahimhadi5390 9 ปีที่แล้ว

    How to use PasteSpecial on your code? I keep get in error when I used PasteSpecial. Thanks

  • @niks2212
    @niks2212 8 ปีที่แล้ว

    dear sir,
    I have followed as shown in d above video. but once I save the excel sheet and next time when I open and I click on button it copies same data again in next sheet. can you inform me a method where macro will b applied only on unsaved data.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      You'll have to first clear all the data in sheet2 or in the sheet where you transfer the data as explained in this link: www.exceltrainingvideos.com/transfer-specific-data-from-one-worksheet-to-another-for-reports/
      Please be careful because you cannot undo a macro action (easily). Read carefully through the article and adjust the code according to your requirements.
      Also you can do a search at www.exceltrainingvideos.com for more ideas and sample files.

  • @hndhnd3894
    @hndhnd3894 8 ปีที่แล้ว

    sir
    thank you for your very good video sir i need your help about vba i have xcell file contains( 6 sheets, sheet 1 main sheet, sheet 2 name client, sheet 3 client etc…) sheet 1 is main sheet this sheet (1) contain 2 column first column for data for example months from jan to december and second column for price i want to transfer or copy price column to another sheets According to name of client Knowing that he will be copied or deport prices many times a column to the columns in the customers sheets

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      +Hnd Hnd These links might help:
      www.exceltrainingvideos.com/copy-data-from-one-workbook-to-another-to-a-specific-worksheet/
      www.exceltrainingvideos.com/copy-paste-multiple-rows-of-data-from-one-workbook-to-another-using-excel-vba/

  • @MujahidAli-wd5ki
    @MujahidAli-wd5ki 7 ปีที่แล้ว

    sir i have done all coding for this ,but only last single row copy and paste to next sheet

  • @MohAboAbdo
    @MohAboAbdo 5 ปีที่แล้ว +1

    Thanks ... Thanks

  • @shivprasadsalkar9827
    @shivprasadsalkar9827 6 ปีที่แล้ว

    Sir, I have used this video to copy data from two worksheets to a third worksheet, all located in same workbook. It works fine and I am getting the desired results. only thing is it takes 8 to 10 seconds to generate the data even though the data in first two worksheets is not more than 32 rows each. The screen flickers like it is searching and come up with the results after 8 to 10 seconds. Is this regular or something wrong in my VBA codes

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      You can use the following code:
      Application.ScreenUpdating=False
      Later set it to true:
      Application.ScreenUpdating=True

    • @shivprasadsalkar9827
      @shivprasadsalkar9827 6 ปีที่แล้ว

      Thanks a lot sir.....

  • @srdkdilip6760
    @srdkdilip6760 5 ปีที่แล้ว

    hello sir , i have one sales consolidator report its very difficult i want one columns of amount separate to another excel sheet its day wise . that is outlet based report . its graph also there can u give one solution for this

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      Search www.exceltrainingvideos.com/ or my channel goo.gl/5Jx1NP

  • @justinwineinger8762
    @justinwineinger8762 7 ปีที่แล้ว

    Can you tell me how to edit this code if the Columns are in another workbook?

  • @maxkth75
    @maxkth75 8 ปีที่แล้ว +3

    Hello Sir!
    Unfortunately I get the following error on the third line. It says: "Runtime error 424 'Object required'.
    Line 3: lastrow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row

    • @peytonsawyer2771
      @peytonsawyer2771 8 ปีที่แล้ว

      +Sebastian Hashimi same problem

    • @surya-td4dg
      @surya-td4dg 8 ปีที่แล้ว

      Hey did you guys figure out the problem ?

    • @digital_whispers
      @digital_whispers 8 ปีที่แล้ว

      same here man. problem not solved

    • @surya-td4dg
      @surya-td4dg 8 ปีที่แล้ว

      Calm Ore Ion Aswan Peter Sawyer Hey guys just let us know if you figure out the solution. I will give a shot on the weekend :) , and if it works i will let you know !

    • @hibee04
      @hibee04 7 ปีที่แล้ว

      i have the same error. Has anyone figured out the fix?

  • @Amjadali-rq6wf
    @Amjadali-rq6wf 6 ปีที่แล้ว

    Hello Sir! my desire if one row copy to other sheet copy are possible

    • @Exceltrainingvideos
      @Exceltrainingvideos  6 ปีที่แล้ว

      This link will help: th-cam.com/video/KNgf4aB8s_k/w-d-xo.html

  • @ramyabhandary6477
    @ramyabhandary6477 3 ปีที่แล้ว

    In the source file shared by seller the header for item name may be one of these values (item_name, item name, title, product name, product_name etc). So when macro fetches any one these headers, it should paste the values under that header to Item Name column of destination file. Please help me with code for above logic.

    • @ramyabhandary6477
      @ramyabhandary6477 3 ปีที่แล้ว

      @@Exceltrainingvideos Looking forward for your next video on this logic. Add few more headers with different possible names for a header in source file. (Ex: in source file macro fetches the header place or location it should paste values under this header to the header named city in destination file). This video will definitely be helpful for me as well as thousands of viewers who are looking for it. Thanks in advance sir😊

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      OK