Transfer Data in Excel From One Worksheet to Another Automatically Using VBA and Macros

Поделиться
HTML-код
  • Опубликовано: 23 июл 2024
  • Join the FREE COURSE 💥 TOP 30 Excel Productivity Tips: bit.ly/3w8yclD
    6 QUICK Ways to Autofill Dates in Excel 🎥 • 6 QUICK Ways to Autofi...
    In this video tutorial we are going to learn how to transfer data from one worksheet to another in Excel, automatically, using Excel VBA and Macros. So let’s get started!
    🔥 Subscribe to my Channel ► bit.ly/1KWfq14
    💎Check Out My Udemy Online Courses ►►►►►►►►►►
    📌Excel Dashboards and Data Analysis Masterclass ► bit.ly/35lO8OK
    📌Excel Macros & Excel VBA Programming for Beginners ► bit.ly/2D3Ipkw
    📌Excel Power Query, Power Pivot, Power Map & DAX Masterclass ► bit.ly/2qwa2jB
    📌Excel Shortcuts, Hacks & Tricks: 100+ Tips for Excel 2016 ► bit.ly/2pEMlW8
    📌Microsoft Excel Charts, Graphs and Data Visualization ► bit.ly/2qyosQr
    📌Python for Beginners: Learn Python in One Day ► bit.ly/2s1nUTy
    📌Complete Gmail Course ► bit.ly/2QCaUxQ
    #excelVBA #MsExcel

Комментарии • 129

  • @mellontrainingtutorials
    @mellontrainingtutorials  5 месяцев назад

    Join the FREE COURSE 💥 TOP 30 Excel Productivity Tips: bit.ly/3w8yclD

  • @kolinsin23
    @kolinsin23 6 лет назад +6

    Been trying to get my head around VBA for a while, your video actually made a lot of logical sence. Thanks very much

  • @dazpick01
    @dazpick01 7 лет назад +3

    Excellent tutorial ,now able to automatically save quotes to a separate sheet with ease, as a novice at excel found this really easy to follow .Thank you :)

  • @poojarao2230
    @poojarao2230 7 лет назад +1

    Thank you
    Found the tutorial very easy and simple to understand
    Keep up the good work
    Thanks again

  • @alexrussell1431
    @alexrussell1431 6 лет назад

    Thank you so much for your tutorial! I learned a lot - I think.
    I'm almost done with my project, but I need to know how to make the transfer from
    ("A2:C2"), ("A3:C3"), (A4:C4") (any given row of A:C)
    to go to the bottom of a list on the second sheet, instead of its corresponding row in the next sheet.
    I want the information to be saved into a list, essentially... Please let me know how I can learn this!

  • @BruceWayne-dh5hy
    @BruceWayne-dh5hy 4 года назад +1

    Thanks Andreas. I am new to VBA and learned a lot from your videos. Keep up your good work and looking forward for more..!

  • @owls1981
    @owls1981 4 года назад

    Great training video. What coding would I have to do in order to move multiple rows (for example, rows 1,4,7,12), based on criteria, to a new worksheet and then delete those rows in the original worksheet? Thank you.

  • @nazmulalam2609
    @nazmulalam2609 7 лет назад +1

    Thank you very much. it is very nicely explained.

  • @yohannesalmaw1414
    @yohannesalmaw1414 7 лет назад

    Amazing SKILL I APPRECIATE THAT. Thank you

  • @NirmalSingh53
    @NirmalSingh53 6 лет назад +3

    Hello Mellon thanks for your tutorial, in fact I was looking for such a formula to transfer data from my Invoice to a worksheet , but the problem is that your tutorial helps in transferring a single row whereas my Invoice have 10. Please guide to transfer multiple rows to a worksheet. Please bring out another tutorial for people like me.

  • @wesleym162
    @wesleym162 4 года назад

    This is exactly what I needed! Excellent video, thank you.

  • @nelcygill4681
    @nelcygill4681 4 года назад +3

    Hi, I'm working with multiple column and rows. It seems I'm having trouble to justify the offset. As an example, my data starts from column A, row 3 on sheet 1. to be moved to sheet 2 same column and row. Appreciate your help, please.

  • @danielfaulhaber2884
    @danielfaulhaber2884 7 лет назад +4

    basically 'copy to = copy from'
    Sheets("sheet2").Range("C:C").Value = Sheets("sheet1").Range("C:C").Value

  • @thelonegamer1070
    @thelonegamer1070 7 лет назад

    Very Nice.... Can you please make a tutorial on how to add values on another row or column using macro button.

  • @mellontrainingtutorials
    @mellontrainingtutorials  4 года назад +6

    In this video tutorial we are going to learn how to transfer data from one worksheet to another in Excel, automatically, using Excel VBA and Macros. So let’s get started!
    Subscribe to my Channel ► bit.ly/1KWfq14

    • @xguyzerx
      @xguyzerx 4 года назад

      how do we transfer data or submit data copy of to another excel file?

    • @MyOnlinePlanet
      @MyOnlinePlanet 4 года назад

      hello can this trick transfer data from my live stock market data to inactive closed sheet. with each and every tick ?
      i need this type trick,

  • @Farid.Barakzai
    @Farid.Barakzai 4 года назад +1

    Hi there, could you please advise how to make a Shape Insert VBA button in Excel?

  • @9010Patrick
    @9010Patrick 7 лет назад +2

    Thank you for the help. I am in an excel class and the book had me creating this macro incorrectly.

  • @archilundilashvili4272
    @archilundilashvili4272 7 лет назад +1

    Thank you. But i wonder how to cut several (and not only 2 contents) cells and paste to another worksheet. what i'll change from the notes? For example: i want to cut from sheet1 a2,a3,a4,b1,b2,b3,b4 cells and paste same cells to sheet2.

  • @tanhaopin1736
    @tanhaopin1736 5 лет назад

    Any Idea if this work if multi-user transfer the data into one main database sheet>?
    Will there be any overwriting or error?

  • @accnotech3863
    @accnotech3863 6 лет назад

    Excellent Job Sir, What if I want to transfer some data from one workbook to another workbook, both workbooks being in same folder. Please help.. Thanks in advance.

  • @bassangler38
    @bassangler38 7 лет назад +1

    Awesome tutorial, can you make an example how to add a command button to edit. Lets say you already transfer all your friend's name and phone # to sheet 2 and then realized that (John, Jacob, Luara) have changed their phone #'s. Can you edit your friend's phone #'s from sheet 1 to sheet 2 in there appropriate range cell that match your friend's names without creating a duplicate record. Thank you

  • @thebesttechnical3608
    @thebesttechnical3608 4 года назад +1

    Thanks for sharing a good and fast way.

  • @jorgenicanor5332
    @jorgenicanor5332 7 лет назад +3

    nice tutorial, can you make example without command button with this same application for example ,if i have a cell with a value of true or false only,thanks

    • @mellontrainingtutorials
      @mellontrainingtutorials  7 лет назад

      Thank you very must Jorge! Can you give me more details of the example you ask?

    • @jorgenicanor5332
      @jorgenicanor5332 7 лет назад

      Same in this video automatic data transfer , using 1/0 value or true/ false in a cell instead of command button and how it will return to first row when i empty the second worksheet, thank you sir.

  • @chanmonanrie6898
    @chanmonanrie6898 3 года назад

    Hi! Wanna know how can I make "Sheet1" which has multiple rows and columns (like invoice items in A2:A10) be transferred into "Sheet2"? Your help will be very much appreciated.

  • @jyeesmuisola8923
    @jyeesmuisola8923 4 года назад +1

    Gracias... Thank you... This was very helpful

  • @Milkpost
    @Milkpost 6 лет назад

    How do you write this entire code for more than two values? This is an awesome video and I feel like I'm so close but the code does not seem to work for me, working with 8+ cell values

  • @jn45672
    @jn45672 5 лет назад

    Is it possible to create a macro to C&P data from excel into a different system without using ctrl+c all the time? for eg. C&P 3000 account numbers into another database

  • @asadost258
    @asadost258 6 лет назад

    Sir during transfer of data while using offset function I want to add link to the customer name simultaneously. So that details of customer name can be open later in a PDF file in a folder, how can I link. Plz help

  • @kppilpunjani696
    @kppilpunjani696 7 лет назад +1

    best example for my little work :)

  • @yohannesalmaw1414
    @yohannesalmaw1414 7 лет назад

    Is it possible to write a VBA code that show us active range having more than one cell when we run the code?

  • @JamesErvinBerry
    @JamesErvinBerry 2 года назад

    Great job!

  • @winpredictor8625
    @winpredictor8625 4 года назад +1

    This video is useful for me.. Thanks my brother..

  • @dorlagrant4079
    @dorlagrant4079 4 года назад +1

    I would like the info for each name to go to their respective worksheets. please advise.

  • @missadventure7564
    @missadventure7564 3 года назад

    Woow.... Thanks buddy.

  • @smilingassassin24
    @smilingassassin24 6 лет назад

    Thank you😊

  • @t.wilson
    @t.wilson 3 года назад

    Is this possible in the google sheets version App Script?

  • @sibomanagaetan2670
    @sibomanagaetan2670 4 года назад +1

    thanks for your lesson show how you can make a summary in multples workersheets

  • @jimmieneilkang6379
    @jimmieneilkang6379 4 года назад

    Hi, what script do I write to ignore the blanks or delete blanks?

  • @maleklasooued5115
    @maleklasooued5115 6 лет назад

    Hello i want to know if it was a list of Names and phones numbers how can i transfer it to another worksheet.

  • @xtrainnings3917
    @xtrainnings3917 4 года назад +1

    how do I do if there is a column 3 and if I want to transfer data to another workbook?

  • @zalmujahid
    @zalmujahid 5 лет назад

    Hi
    how copy one sheet excel to many files at a time

  • @MrTosha43
    @MrTosha43 3 года назад

    Great work

  • @IME29
    @IME29 4 года назад +2

    Why my third entry overwrite the second entry? .. Thanks sir

  • @frazmehvi5258
    @frazmehvi5258 7 лет назад +2

    Nice Video, But I want to transfer series of Cell from one sheet to another sheet

  • @arunkumar242
    @arunkumar242 4 года назад +1

    Hi thanks for the video
    I would like to know how to copy multiple rows to multiple coloumn

    • @arunkumar242
      @arunkumar242 4 года назад

      for Invoice concepts Like Product Qty And The Total Amount only

    • @mellontrainingtutorials
      @mellontrainingtutorials  4 года назад

      Thank you Arun Kumar for your recommendations. I'll do my best to improve it!

  • @stuartgillies3817
    @stuartgillies3817 5 лет назад +1

    Hi Mellon great work but I am getting a Run time error"1004" at this command Worksheets ("sheet2"), Range("a1").End(x1Down).SelectCan you help with this please?

    • @rasmusgrambow7252
      @rasmusgrambow7252 5 лет назад +3

      it should be "Worksheets ("sheet2"), Range("a1").End(xlDown).Select" you repalced the l with a 1

  • @tazeemhussain7481
    @tazeemhussain7481 6 лет назад

    this is good thanks,
    can you please help little bit more..!
    I need to copy multiple rows from sheet1 to sheet2, sheet3, sheet4 and sheet5 based on a cell value in range M column..?
    pls guide me with it ASAP.

  • @srikanthkasala7850
    @srikanthkasala7850 6 лет назад

    Dear Sir, you did great explanation Sir. This video very useful to me. I tried but not getting correctly output to me....... I need your help... In same way, how can make a Search box and Highlight Data in excel and automatically transfer and save Data programming one sheet to another sheet. If I copy the highlighted data when I paste particular data, that data only paste in columns. And more over I want take print out from that sheet what I searched data will be output print. For example I want to search and highlight data and auto save the data work sheet-1 in excel from What we are entering data should be save in work sheet-2/3/4... If I search the data in worksheet-1 correct display the answer. Can you Sir make a video or send the worksheet.

  • @teambareilly-modicare5681
    @teambareilly-modicare5681 4 года назад +2

    What happened if we want to add data from sheet 1 to sheet 3 as well

  • @dimpypuri2919
    @dimpypuri2919 5 лет назад +1

    Hi,
    I am getting a Run time error"1004" at this command Worksheets ("sheet2"), Range("a1").End(x1Down).Select

    • @CryMoarZ
      @CryMoarZ 4 года назад +1

      Make sure that (xlDown) is with the letter 'L' after x. It looks like you have '1' put in the command :)

  • @masnawiahzainuddin9516
    @masnawiahzainuddin9516 6 лет назад

    how to prevent duplication in two different worksheet....i want to link data that have in different sheet....such as sheet 1 and sheet 2, so if i entered the same Id that have in column C in sheet 2 in sheet 1 also in column C...the excel will prevent it. ....sorry for bad english

  • @b3lg4r4th8
    @b3lg4r4th8 4 года назад +1

    Very good video, but can be acheived in a much simpler way.

    • @mellontrainingtutorials
      @mellontrainingtutorials  4 года назад

      Thank you b3lg4r4th for your recommendations. I'll do my best to improve it!

  • @kendravictoria6776
    @kendravictoria6776 7 лет назад +1

    when i try to apply the formula i keep getting told it has a syntax error. HELP!

  • @shaukatsamad2510
    @shaukatsamad2510 5 лет назад +1

    Hi, Sir,Is there any way to transfer date to another sheet without useing VBA , thnx......

  • @medlines167
    @medlines167 4 года назад

    please some 1 help me i do same the vedio and its work well but there is problem ... when i transfer data its move data down OF a on shaeet 2 not next cell as in vedio sorry for english

  • @abiramimannarmannan2314
    @abiramimannarmannan2314 4 года назад

    How to compare two excel files and add the data from one excel files into another excel files

  • @mazharulalam7541
    @mazharulalam7541 5 лет назад

    Good job

  • @mustafahussainmohsin320
    @mustafahussainmohsin320 4 года назад

    Hello,
    I have tried your formula, its working for first two entries, but when I enter 3rd entry, it overwrites on the 2nd row of sheet 2? please help?

  • @MrPakiwarrior
    @MrPakiwarrior 5 лет назад

    I get debug 1001, what can i do?

  • @ShahbazAli20382
    @ShahbazAli20382 7 лет назад

    Sir Data Transfer Correctly but when i click Button Run time error438 "Object does not support this property or method

  • @MrPakiwarrior
    @MrPakiwarrior 5 лет назад

    Plz send me a video guadiance on this debug thing. Its not working :(

  • @miguelate
    @miguelate 7 лет назад

    I want to copy all the data from several worksheets to a master worksheet. Let's say an individual worksheet will have data in only 3 columns name, possible points and total points. Another worksheet will have the same column names and many more. I want all these information no merged but displayed individually but on the same master worksheet. So the master sheet will have all teams separately displaying all the information next to each other to compare. 1st showing the first worksheet and next the 2nd worksheet data. I hope it makes sense. I have found videos on how to merge, consolidate, get ranges, etc... but I haven't found anything to do what I'm trying to do. If it's done automatically it would be best. A different person will be adding information to each worksheet and all the data from all the worksheets should be automatically updated to the main worksheet to see all groups next to each other and compare. This is for a competition.

    • @mellontrainingtutorials
      @mellontrainingtutorials  7 лет назад

      Hello Miguel,
      The solution to your problem is using Excel Vba code. Look at the following code, it'll help you:
      Sub CombineData()
      Dim Sht As Worksheet
      For Each Sht In ActiveWorkbook.Worksheets
      If Sht.Name "Master" Then
      Sht.Select
      Range("A:A").Insert
      Range("A2").Formula = "=Mid(Cell(""filename"",B1),Find(""]"",Cell(""filename""))+1,255)"
      Range("A2").Copy
      Range("A2").PasteSpecial Paste:=xlPasteValues
      Range("A2:K2").Copy
      Sheets("Master").Select
      Range("A65536").End(xlUp).Offset(1, 0).Select
      ActiveSheet.Paste
      Sht.Select
      Range("A:A").Delete
      Else
      End If
      Next Sht
      End Sub
      Just add a sheet in to your workbook called Master.
      Make sure you save the file first or the sheet names will not pull through

      Εμφάνιση λιγότερων

    • @miguelate
      @miguelate 7 лет назад

      thanks a lot

  • @sivaprasadk9869
    @sivaprasadk9869 3 года назад

    I hv to maintain two sheets, one is for quarterly and another for yearly performance. Now I ll enter weekly data in some other sheet. Now all I want is, whatever I enter in my weekly sheet should be transferred to both the sheets mentioned above. And once week got over, again I ll enter 2nd week performance. This time after clicking the transfer button, 2nd week performance should be added to the first week data.
    How to do it
    Could you please let me know... Plzzz

  • @eteruzamedas9349
    @eteruzamedas9349 4 года назад

    Can it be transferred from one excel workbook to another?

  • @bhashithaprasanga8899
    @bhashithaprasanga8899 6 лет назад +3

    I need to transfer multiple row automatically from Sheet 1 to Sheet 2. But transferred only first row. Please any one have idea ... please help me.

    • @jjelpesocondor6591
      @jjelpesocondor6591 5 лет назад +1

      if you want to transfer 10 rows of data, then copy all of the cells above your data header. go to the next page and paste those. you can give a background color of these pasted cells thus u can recognize them later welly. go back to the 1st page and write your data in those 10 rows, create a shape like a button from the insert tab, click on the "record macro" icon, name the macro, copy all the data you need to transfer, go to the next page, select all the cells you have pasted before, click the "use relative references" icon and then paste your data right down those selected cells. go back to the 1st page, click on "clearContent" icon and then click on the stop macro icon, right click on the shape button and assign macro. you are done...!! then type whatever you need and click on the button and watch what happen...!

  • @darrenwalter9093
    @darrenwalter9093 7 лет назад

    How would you move a cell with a formula, without moving the formula (value only).

    • @mellontrainingtutorials
      @mellontrainingtutorials  7 лет назад

      Drag the cell with right-click of your mouse. Then when you drop it into the cell you prefer, a menu will appear. You'll choose paste (values only).
      Hope that helps.
      Andreas

    • @darrenwalter9093
      @darrenwalter9093 7 лет назад +1

      Apologies, you misunderstand. Using the method above, if one of the cells you are moving to the new sheet has a formula in it will not move using this method. What would you need to add to the code to move the value of the cell and not the formula, thanks.

  • @gracegronze5410
    @gracegronze5410 7 лет назад

    HOw can I transfer the data one workbook to another workbook instead of one sheet to another sheet?

    • @mellontrainingtutorials
      @mellontrainingtutorials  7 лет назад

      Hi Grace . Please check the following code:
      Sub foo()
      Dim x As Workbook
      Dim y As Workbook
      '## Open both workbooks first:
      Set x = Workbooks.Open(" path to copying book ")
      Set y = Workbooks.Open(" path to destination book ")
      'Now, copy what you want from x:
      x.Sheets("name of copying sheet").Range("A1").Copy
      'Now, paste to y worksheet:
      y.Sheets("sheetname").Range("A1").PasteSpecial
      'Close x:
      x.Close
      End Sub

  • @ornatumornatum1884
    @ornatumornatum1884 7 лет назад

    Hi,
    I would like to ask you how we can do the following and please help!!!!
    If we have to type more than 1 entry at Sheet1 and transfer the data to Sheet2, and then again, type other entries( more than 1) at Sheet1, transfer to Sheet 2, without loosing data on Sheet 2 that has been transfered before?

  • @Boinks3316
    @Boinks3316 7 лет назад

    I tried this formula but when I enter another info it doesn't transfer to sheet2 and it does not go down to a free cell? pls help

    • @mellontrainingtutorials
      @mellontrainingtutorials  7 лет назад

      Hi Eric,
      Which formula do you mean? Can you give me your Vba code so I can check it?

  • @apalabunoroland7083
    @apalabunoroland7083 5 лет назад

    Please ,I used your codes and ended up with object required as an error.

  • @MUSHTAQAHMED-eq2tv
    @MUSHTAQAHMED-eq2tv 5 лет назад

    good

  • @danielmacahilig6869
    @danielmacahilig6869 7 лет назад +1

    why in my excel 2016 didn't work?

    • @poweroff9593
      @poweroff9593 6 лет назад

      Ithink 64bit need diffrant code and more easy becuse many update between them

  • @belleilagan
    @belleilagan 7 лет назад

    Hello, should this work if the data in a cell is selected from a validated data? I tried using your tutorial but I am experiencing the 1004 error. Here's my code:
    Private Sub CommandButton1_Click()
    Dim TW_Name As String, RM_Process_Task As String, Status As String, Date_Updated As String
    Worksheets("RMP_updater").Select
    TW_Name = Range("A2")
    RM_Process_Task = Range("B2")
    Status = Range("C2")
    Date_Updated = Range("D2")
    Worksheets("RMP_checklist").Select
    Worksheets("RMP_checklist").Range("A1").Select
    If Worksheets("RMP_checklist").Range("A1").Offset(1, 0) " " Then
    Worksheets("RMP_checklist").Range("A1").End(x1Down).Select
    End If
    ActiveCell.Offset(1, 0).Select
    ActiveCell.Value = TW_Name
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = RM_Process_Task
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Status
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Date_Updated
    Worksheets("RMP_updater").Select
    Worksheets("RMP_updater").Range("A2:D2").ClearContents
    End Sub

    • @mellontrainingtutorials
      @mellontrainingtutorials  7 лет назад

      Hi Belle,
      The 1004 VBA error most of the time has to do with cell or cell range. I suggest to open a new workbook, copy your data and paste them as non validated , and then try your code again

  • @Njay-music
    @Njay-music 5 лет назад +1

    nice thanks . I asume you are Italian. coz customer name = Catso mer name

  • @rynodutoit4
    @rynodutoit4 4 года назад

    "shit 1 and Shit 2" lmfao i need to grow up

  • @masnawiahzainuddin9516
    @masnawiahzainuddin9516 6 лет назад +1

    hope someone can help me.....

  • @accountingjobwantedanywher8220
    @accountingjobwantedanywher8220 6 лет назад

    It Shows Error 1004 in Excel 2007

    • @mellontrainingtutorials
      @mellontrainingtutorials  6 лет назад

      Hi there,
      To solve runtime errors, you may insert a new worksheet file into a template rather than duplicating or copying an existing worksheet.
      Follow the steps below to solve Runtime Error 1004 for Microsoft Excel 2007:
      1.Make a new workbook and delete any other worksheets.2.Format your workbook and put any charts or texts that need to be placed into the template.3.Put a name for the file, making sure to choose the template format "(xltx)".4.Place the template making use of this code: SheetsAddTyp:=path\filenameTake note, the \filename path will contain the file name and full path for the template you're working on.

  • @paulcoffee77
    @paulcoffee77 7 лет назад

    is this einstein ?

  • @synocate5602
    @synocate5602 6 лет назад

    0:24 - you have two shits?

  • @williamchua5274
    @williamchua5274 5 лет назад

    Is it possible to do this? But the output will be on a different excel file?