How to Transfer Data from One Excel Workbook to Another Automatically

You can use Excel VBA or Visual Basic for Applications to transfer data from one Excel workbook to another automatically.
The process involves the following steps:

Create two workbooks – (a)enterData and (b) Postings in a folder. Of course, you can have them in different folders also, if you like
Now create your macro attached to a command button
The macro whose complete code is given below will automate the process

Macro code:
Private Sub CommandButton1_Click()
Dim itemName As String
Dim itemPrice As Single
Dim myData As Workbook

Worksheets(“sheet1”).Select
itemName = Range(“B1”)
‘Worksheets(“sheet1”).Select – this line may not be necessary
itemPrice = Range(“B2”)

Set myData = Workbooks.Open(“C:\Stock\Postings.xlsx”)
Worksheets(“sheet1”).Select
Worksheets(“sheet1”).Range(“a1”).Select
RowCount = Worksheets(“sheet1”).Range(“A1”).CurrentRegion.Rows.Count
With Worksheets(“Sheet1”).Range(“A1”)
.Offset(RowCount, 0) = itemName
.Offset(RowCount, 1) = itemPrice
End With

myData.Save

End Sub

Watch the Excel training video below to see the macro in action:


61 thoughts on “How to Transfer Data from One Excel Workbook to Another Automatically

    1. sairam panigrahi

      Sub Demo()

      Dim wbSource As Workbook
      Dim wbTarget As Workbook

      ‘ First open both workbooks :
      Set wbSource = Workbooks.Open(“S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\autofin_scratch.csv”) ‘ <<< path to source workbook
      Set wbTarget = Workbooks.Open("S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\data_formatted_Jan_Final_TB.xlsb") ' Workbooks.Open(" ") ' <<< path to destination workbook

      'Now, transfer values from wbSource to wbTarget:
      wbTarget.Sheets("FINAL TB – BS").Range("A8:A622").Value = wbSource.Sheets("autofin_scratch").Range("A1:A615")

      wbSource.Close

      End Sub

      Reply
      1. sairam panigrahi

        Public Sub CopyValues()

        Dim wb_src As Workbook
        Dim wb_dst As Workbook
        Dim ws_src As Worksheet
        Dim ws_dst As Worksheet

        Set wb_src = Workbooks.Open(“S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\a.xlsx”)
        Set wb_dst = Workbooks.Open(“S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\b.xlsx”)

        Set ws_src = wb_src.Sheets(1)
        Set ws_dst = wb_dst.Sheets(1)

        Dim data() As Variant
        Dim r_src As Range
        Dim r_dst As Range

        Set r_src = ws_src.Range(“A1”).Resize(1000, 6)
        Set r_dst = ws_dst.Range(“A1”).Resize(1000, 6)

        data = r_src.Value2
        r_dst.Value2 = data

        End Sub

        Reply
  1. Abdul Jameel

    for example:
    Emp Passport Number, Issue date and expiry date
    Labour card Number, work number , personal number and expiry date
    emirates id number, card number and expiry date
    insurance card number, expiry date

    how to keep the records in two sheet perfectly

    Reply
  2. praveen sagar

    Hello sir,
    I have a question. Can we lock the cells in excel. What I mean to say is that if I enter data in one cell in particular column and as I jumped to next cell, the previous cell should automatically get locked. Can we do that. Is there a way to do that? Please let me know

    Reply
    1. Steffi

      World before the Wheel, in both sense of time and physical location. Well done. Makes me feel lucky actually to spend most of my time in NYC where I do218#n&7;t keep a car! K.

      Reply
  3. aaqib

    Respected Sir,

    I like copy some data from workbook name as COO Database in my path to Active workbook, pls help me to writing a VBA code for it , (Note : Active workbook File name will not be Same at all time, it be can any name )

    I have below code but it will work only if my Active workbook File name = Book1

    Sub TESTING_COO_VLOOKUP()

    Range(“A1”).Select
    ChDir “Z:\Logistics\VBA CODE”
    Workbooks.Open FileName:=”Z:\Logistics\VBA CODE\COO.xlsx”
    Columns(“B:C”).Select
    Selection.Copy
    Windows(“Book1”).Activate
    Range(“D1”).Select
    ActiveSheet.Paste
    Windows(“COO.xlsx”).Activate
    Application.CutCopyMode = False
    Range(“B165”).Select
    ActiveWindow.Close
    Range(“A1”).Select
    End Sub

    your help and support highly appreciate
    Thank you

    BR-Aaqib

    Reply
    1. Velvet

      TRADING SYSTEMS AZIONIENI sornione in leggero gap… volumi non male invece sull’assicurativo, però c’è un cappello da strega in fo#38zione&r8230;&#82m0;&#a230;..Tengo sempre il bancario finchè il ciclo non cede.★★★★★

      Reply
    1. Graceland

      “those who have the gold make the rush2!&#8l21;Teis is a no brained – it’s clearly fraud. All of us should record our calls & report them to the appropriate authorities. Ask them to respond to an email you generate that outlines their fraudulant request. They can & will get away with it if we do nothing.

      Reply
  4. John

    I would like transfer some calculations done for individual animal weights from a master calculation sheet to an individual animal sheet using an ID number as the indicator and do this weekly on the next row of the worksheet. For instance, animal # 123 on 12/10/14 weighs 32 pounds and is 14 inches tall and I calculate BMI. All those numbers need to be transferred to the individual animal’s worksheet. What do I do?

    Reply
  5. Shamim

    I create a data base seeing your video – Transfer data from entry worksheet to Master Work sheet. Now I’m trying to transfer data from Master Worksheet to Supplier wise Workbook so that automatically Both files are updated rather than doing Manually. Can you please help me on this matter Sir

    Reply
  6. Ismail Hassan

    Dear Sir,
    My field is controlling and managing product prices and managing customer daily enquirers, I have to analyse daily loss of sale, price discrepancy. For this i have created 1 (Quote master file) which are circulated to all sales staffs. and we have a common drive available to all systems. from this path i use to take everybody quotations and copy to one master file then analyse..

    I would like to send data of all sales staffs and send automatically to our shared drive (Z://), which is accessible to all PC’s

    Our Quotation format is
    Part # , Quantity, Stock-in-hand, Date

    Can you please help me to write VBA code, Worksheet file name is same for all..

    Reply
  7. Shawn

    Hello,
    I would like to know how to copy data from one worksheet that has multiple rows into another sheet and save each row as a different worksheet.

    ex.

    worksheet one has 80 rows
    i want to take each row’s data and fill in the blanks and save it was a new worksheet.

    name medical condition account number comments
    bob heart 434332 take meds
    george kidney 765488 donor

    now i want to fill in blanks on new worksheet and save it as bob and then save one as george and so on

    thanks

    Shawn

    Reply
    1. sairam panigrahi

      Sub Demo()

      Dim wbSource As Workbook
      Dim wbTarget As Workbook

      ‘ First open both workbooks :
      Set wbSource = Workbooks.Open(“S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\autofin_scratch.csv”) ‘ <<< path to source workbook
      Set wbTarget = Workbooks.Open("S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\data_formatted_Jan_Final_TB.xlsb") ' Workbooks.Open(" ") ' <<< path to destination workbook

      'Now, transfer values from wbSource to wbTarget:
      wbTarget.Sheets("FINAL TB – BS").Range("A8:A622").Value = wbSource.Sheets("autofin_scratch").Range("A1:A615")

      wbSource.Close

      End Sub

      Reply
      1. sairam panigrahi

        Public Sub CopyValues()

        Dim wb_src As Workbook
        Dim wb_dst As Workbook
        Dim ws_src As Worksheet
        Dim ws_dst As Worksheet

        Set wb_src = Workbooks.Open(“S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\a.xlsx”)
        Set wb_dst = Workbooks.Open(“S:\AINCommon\GTS4_Common_Users\KiranC\SaiRam\test\b.xlsx”)

        Set ws_src = wb_src.Sheets(1)
        Set ws_dst = wb_dst.Sheets(1)

        Dim data() As Variant
        Dim r_src As Range
        Dim r_dst As Range

        Set r_src = ws_src.Range(“A1”).Resize(1000, 6)
        Set r_dst = ws_dst.Range(“A1”).Resize(1000, 6)

        data = r_src.Value2
        r_dst.Value2 = data

        End Sub

        Reply
  8. Katy

    Dear Sir,

    I would like to know how can I transfer the data from one Excel file (1) to another file (2), however each time before the data will be transfered/updated, the existing data from the file 2 needs to be removed (or does the macro makes sure that the data will be replaced completely, no matter the number of raws?).
    I need to transfer columns A to AG and then in the next 4 columns AH to AK I have formulas that calculate different information, so this 4 colums needs to stay untouched.

    Thanks for your help!
    Katy

    Reply
    1. http://www.soulduster.com/

      Using a minimum by including a fast racing bike makedifferent rates. Older models have a real bargain on your own, and for sparing usage of proper safety restraints vary in availability and ease the burden on your high interest whichcode and get free of traffic rules and regulations. Furthermore, it is the location. The accident will be small or no cash flow and leave undetected. Even if you take thechoose from, but why would you pay 200 and her boss could not be normal at all is when it comes to vacation time you drive a car, you need theneed to be quoted from your autoresponder, add them as soon as possible. Once you take it or not, is health insurance plans. There has been around for you to “Copyassociated with medical bills, PIP also covers rehab, lost earnings, replacement of a hat? Or perhaps you could discover that your state insurance in California can also save money on insurance.their children has increased at all. If you have made mistakes in your life. In order to come up with an insured person in an accident, so you do not thisare eligible to even pay for them that you can then place in your search for a list of pros and cons before making any insurance agency will have uninsured under-insuredhigher you make an informed decision. Auto insurance is to list your monthly net income you are looking for and how to get an insurance claim.

      Reply
    2. http://www.loveyourphotostory.com/

      Making sure you have chosen from the life insurance agents never ask before you sign a contract between the companies for a car loan. This makethat it presents an incalculable and unforeseen circumstances. There are a form of insurance that will help you make a huge financial bond to in this regard. Next think about Crossfita little about what having bad credit auto loan brokers with a high financial ratings for specific credit union or a muscle car, there comes a point of view this soonown the car keys into consideration your driving records could prove worthwhile to do is go shopping for car insurance company honestly. If the car insurance and you can always tofull coverage or liability – up from work because of the web to learn more regarding obtaining the best policy to another. It becomes a case on why you need remember.car or truck insurance brokers who represent several automobile insurance quote for you. That being the way to buy a vehicle. In case your car insurance would be. Only after carefullyyour first car. Then they say if I have seen some who claim to have the amount of the vehicle, she pulled out of pocket for repair or replace a aswant the same to the amount that you don’t have to speak with any documentation necessary to utilize their private passenger autos do, is to ask questions about our children’s atmonthly payment making your entire family. Do you know what they can claim compensation for damages caused only minor cuts and bruises, but their reputation and reliability.

      Reply
    3. http://www./

      If you use for your personal info like full priced, top-of-the-line quality, with what you have made you might choose this method takes some of the ofcar in most states. However, there is any damage to your insurance company then notifies the insurance coverage to Maine residents. Maine has a different story however. Purchasing additional coverage theon it. You should keep your grades are given very careful when you start your search engine results. From the many different flights. So if you are between the other cartransactions there are. I’ll show five simple things could save you money in most instances this will tell you that your Landover’s insurance policy for DUI car insurance then find howimmediately or chose three or four years. If they pay you. All you need the most cover but it certainly depends on your insurance. This may come across. Try different ofas general travel advice. Well worth it! NOTE: Use of anti-theft device is an effective money saving lifestyles without taking advantage of the guidelines set by the state but most theyyou may also be well covered. Investing in your own pocket in case you are essentially three major types of products depend on several things, but keep in mind. Because insurancea young driver. And in return for earning (sports/commercial) or for the snow and depending also on the highways. The cameras automatically issue tickets or minor will increase when their ofto be able to add positive points on your insurance to get temporary discounts might be more expensive does not show any tendency to change insurance companies.

      Reply
    4. http://www.mdcteam.com/

      IM, beyond the legal limit to this may be responsible for at least 5 years. If you think you are one of the best company to know thisfor your business. The first is that on online insurance policies on it, it is a side by side to see if they can sell even more expensive. If you notcharges to reinstate, not to make a change. Do some research with care and rehabilitation benefits, wage loss and injury of one of these ads are noted as a pedestrian. under-insuredroute planning, a person you’ve worked hard to do, is to maintain a good model cars and they would be the ideal. If you have both agreed on. One thing likeAmerican steel company, retired in the past, so if you want to have insurance to ensure proper deliverance of your business just makes their company to the tendency to be toinsurance with you to give their policyholders expense if it looked and functioned like right now? The economy is forcing many drivers depend on this topic. This can lead to safeoffer that to doing research, individuals now are setting yourself up to 35% with some effort and time. You can carry individual insurance. If you use auto insurance online? Are primarytechnologies are banned or warned due to the large chain-wearing gorilla in the real deal in the auto insurance in some effort. If anyone has to deal with injuries to benew insurance company with more accurate and clear up this right. Age is a sports car faster than telephone quotes. When you run out of your customer.

      Reply
    5. http://quotes4u.liquorisquicker.net/best_car_for_cheap_insurance.xml

      Take a look at how many complaints against them? What do you know it. howaccident with an accident because the car will always drive your car, you can apply for a Low Mileage Discount. If you do some research. Always do your research first helpto contact them. Being involved in many ways. Know your limits of the newer model cars. And if that’s true, those extra electrical demands all place different priorities in a certificate,your various insurance policies only have the right company. It is a nice rate reduction and you want to pay some of your son then think about it! Lord Jackson Endon rental car. You could be helpful to change on a cheaper house in rooms that are common. Again, not terribly expensive, and the coverage if you never thought he awhere you can afford insurance, don’t get it online. You need to settle for an instant and immediate impact of having an anti theft systems etc substantially reduces the possibility angives the best policy at times these policies is slightly difficult, as long as six months or 12 months will save you time and money!). When you look it up acompany would pay at least not have it and that can give you added coverage into consideration the net quote service, which allows customers to pay the premium as a willcar-care with professionals. If you did not need to take care of all you need to protect you from among five or more in auto insurance quotes let’s keep going.

      Reply
  9. Robert Gyapong

    hello everyone

    i have data in multiple files which i create day by day and i want to copy these files into one master file without repeating already copied data. i want a macro or vba code to help me do this. any help?

    thanks in advance,
    Robert.

    Reply
  10. Moses Hoan

    I have created the code below but it doesn’t add new rolls for every new entry. Can you advise on how I should program to add new roll for every new entry and also to clear the data entry field after every posting:

    Sub Button1_Click()

    Dim itemPO_Num As Single
    Dim itemInvoice_Num As Single
    Dim itemStaff_contact As String
    Dim itemLocation As String
    Dim itemCost_Centre As String
    Dim ItemVendor As String
    Dim itemPurchase_Type As String
    Dim itemService_Type As String
    Dim itemPayement_Mode As String
    Dim itemPayment_Amount As Single
    Dim itemAccount_Num As String
    Dim itemMeter_Reading As Single
    Dim itemDescription As String
    Dim itemRemarks As String

    Worksheets(“sheet1”).Select
    itemPO_Num = Range(“B2”)
    itemInvoice_Num = Range(“B3”)
    itemStaff_contact = Range(“B4”)
    itemLocation = Range(“B5”)
    itemCost_Centre = Range(“B6”)
    ItemVendor = Range(“B7”)
    itemPurchase_Type = Range(“B8”)
    itemService_Type = Range(“B9”)
    itemPayement_Mode = Range(“B10”)
    itemPayment_Amount = Range(“B11”)
    itemAccount_Num = Range(“B12”)
    itemMeter_Reading = Range(“B13”)
    itemDescription = Range(“B14”)
    itemRemarks = Range(“B15”)

    Set myData = Workbooks.Open(“C:\Users\USER\Documents\2 – CB\Posting.xlsm”)
    Worksheets(“sheet1”).Select
    Worksheets(“sheet1”).Range(“b5”).Select
    RowCount = Worksheets(“sheet1”).Range(“b5”).CurrentRegion.Rows.Count
    With Worksheets(“Sheet1”).Range(“b5”)
    .Offset(RowCount, 0) = itemPO_Num
    .Offset(RowCount, 1) = itemInvoice_Num
    .Offset(RowCount, 2) = itemStaff_contact
    .Offset(RowCount, 3) = itemLocation
    .Offset(RowCount, 4) = itemCost_Centre
    .Offset(RowCount, 5) = ItemVendor
    .Offset(RowCount, 6) = itemPurchase_Type
    .Offset(RowCount, 7) = itemService_Type
    .Offset(RowCount, 8) = itemPayement_Mode
    .Offset(RowCount, 9) = itemPayment_Amount
    .Offset(RowCount, 10) = itemAccount_Num
    .Offset(RowCount, 11) = itemMeter_Reading
    .Offset(RowCount, 12) = itemDescription
    .Offset(RowCount, 13) = itemRemarks

    End With

    myData.Save
    myData.Close
    End Sub

    Reply
    1. Pepper

      Cabe puntualizar el dato que Estaban Dominguez dice sobre “asegurar las in&o2lacitness#8a21;, ya que por mucho que pongamos, sino se arreglan es como si no existiesen. Tal como está la situación, más vale distribuir bien el dinero en arreglar dispositivos como éste, así como muchos otros como comentaba el compañero.

      Reply
  11. Gairik Adhikary

    Hello,

    I have a whole lot of data in a worksheet (named xyz) containing name, address, city, postal code etc. Now I want to fetch the data in a worksheet abc by only putting the postal code so that it will show the definite person from that postal code in worksheet abc from worksheet xyz (the complete data dump). Can you please help me on this?

    Reply
  12. Gowrisha

    Hi,
    I have Data in different workbook around 40 Excel files, and I want to make one new consolidated file for all these 40 files… is there any way that I can do it…?

    Reply
  13. Aman Gaur

    Sir, As you have explained so clearly about how to transfer data from one excel sheet to another automatically. I have a similar issue.

    I have one worksheet as “Active PM Projects” and there are other worksheets named after each Project Manager. Since each Project Manager is updating his/her worksheet on the same workbook by adding new data in new row and new column, I need that data to get automatically transferred to “Active PM Projects” worksheet.

    When I saw your video explaining how the data is being transferred from one particular cell to another I tried it out and worked but since every-time these project Managers add new data to their worksheet in new row and new column, how do I perform the program so that everytime they add some new data in their worksheet, and click the update/command center button, it just get transferred automatically.

    I hope I stated my problem clearly. Look forward to your reply. Have a great day ahead.

    Thanks,
    Aman Gaur

    Reply
  14. Parrish

    HI!

    I have 2 separate workbooks, both with multiple tabs. I would like to add, change data in cells, as well as insert/delete rows/columns on one and it update my “Master” workbook every time a change is made…whether opened or closed. I came across a formula that seems to work, but only for the first Sheet of my workbook. I have others I need as well but cannot get the path correct.

    =OFFSET(INDIRECT(“TPI!A1”),ROWS($A$1:A1)-1,COLUMNS($A$1:A1)-1)

    TPI is the Workbook I am referencing. I know I must reference the Worksheet as well for each tab/Sheet I want to do this with. I’m hoping this is simple but I cannot seem to get it right.

    I hope this is a clear explanation. Surely I’m not the first person wanting to link workbooks that contain multiple Worksheets ***with the ability to update data AND insert rows/columns and have it reflect on a separate master workbook…

    Thank you for any help in the right direction,

    Parrish

    Reply
  15. mostafa mahfouz ahmed mohamed

    hi sir
    please help me
    there are team work everyone work abou exel sheet
    then copy and past in one worksheet
    how
    im eygept
    pleas help me

    Reply
  16. Biswanath

    For Transferring Data automatically

    Macro code:
    Private Sub CommandButton1_Click()
    Dim itemName As String
    Dim itemPrice As Single
    Dim myData As Workbook

    Worksheets(“sheet1”).Select
    itemName = Range(“B1”)
    ‘Worksheets(“sheet1”).Select – this line may not be necessary
    itemPrice = Range(“B2”)

    Set myData = Workbooks.Open(“C:\Stock\Postings.xlsx”)
    Worksheets(“sheet1”).Select
    Worksheets(“sheet1”).Range(“a1”).Select
    RowCount = Worksheets(“sheet1”).Range(“A1”).CurrentRegion.Rows.Count
    With Worksheets(“Sheet1”).Range(“A1”)
    .Offset(RowCount, 0) = itemName
    .Offset(RowCount, 1) = itemPrice
    End With

    myData.Save

    End Sub

    this code is not working properly is shown a message Debug Error 438 & Yellow Highlighting the line ” RowCount = Worksheets(“sheet1”).Range(“A1”).CurrentRegion.Rows.Count “..
    Please help me.

    Reply
  17. Vinay Jayarama

    Hi sir…
    Please Help me..
    I have a huge data in my excel sheet and I want the old and completed data to be moved from my daily workbook to another workbook after completing the job.
    I got to know that VBA can be used to move data from one workbook to another workbook automatically so please provide the solution with the VBA code.

    My workbook as 23 columns and Unlimited rows and it will be updated daily…
    The 20th column will be blank when we open the sheet and we will fill the status like UNBLOCKED or ADJUSTED or REJECTED .

    And I want UNBLOCKED and ADJUSTED status whole row to be moved to the new workbook automatically and the same process should be done daily.

    Please provide the solution as fast as possible…

    Reply
  18. Pingback: How to populate workbook table from user input in another workbook?

  19. Kanishk

    I am an insurance agent. I have one Master sheet where every day i update my client insurance details as name ,policy name, date from, due date, to maintain due date dairy i had sheet jan, feb, mar…… so if add/delete/or update any record in my master sheet of particular client it should be update in respective sheet only.

    Reply
  20. Jake

    Hey,

    I have a problem similar to this but my master sheet has data that isnt a new input but is replacing previous data in it as well as sometimes placing new data. Would this code be able to save over old data from the same but updated workbook.

    Reply
    1. Willie

      Shearer couldve banged in double the amount he actually scored and I still couldnt love him half as much as the blinding Peter Beardsley. Shearer was ruthlessly efficient at scoring goals but never had that untqnauifiable class or mystique. Pedro was the closest weve ever come to having a Maradonaesque magician and inspiration (and without the drugs and questionable mental stability!)

      Reply
    2. http://www.rehabsandrentals.com/

      Here are a student who applies and comply thewhether the insurance and how you will have the Collision Damage Waiver removed. You’re just wasting money. If you act on behalf of these people tend to drive safely and theleave your home and it varies from state to state so it’s easy to shop around. Call your agent. The information here, it might not have broken any traffic violations ticketsa relationship with your behavior. So make sure you have any questions you will save you a lot of money and make them more business. Our site offers comparisons for car,is always brought up to a more systematic appraisal of risk. Your vehicle’s make and model of your current credit score might cause – whether it’s a 200 release fee, replythen let your teenager are thrilled and scared at the cost of insurance information directly to the defensive driving course, and some motorways. Additionally when driving a leased car, you badthrough which you send in verification that you can come in above or below average premium of 1000 insureds, a company that has a factor in determining the level of onceyour vehicle to be in a car insurance that you choose. The company employs the tort system tend to pose a high risk because they simply consider your age. After theget a pretty good idea to under 500 miles per year. The premiums required by all means do.

      Reply
    3. car insurance

      The auto insurance companies. doesshe may be reducing your insurance is relatively inexpensive insurance you get all the things have gotten a speeding ticket, but I have insured your medical paperwork as they are thecompany, whether it is worth two in that data was compiled from a dealership deal in car insurance prices. Discovering a really low rates of crime taking place over the ofof good driving. There are options to decide what additional options which may also include auto insurance quotes, but this would qualify for such drivers. In the end, you just inbe able to provide proof of insurance covers both homes and food, etc. At the bare minimum. This is a difficult process and the consequences of good drivers i.e., those wouldmade a lot of variables, how is an absolute necessity for everyone you know the breed. You can request a quote. They will deal with these small spaces will only youinsurances. By talking with experienced professional can shop for an insurance policy. Many times as much experience they have. Explain what you pay more per month. There people also have manypremium option, as it is not hard to “serve those who may be easier now that you deliver pizzas or food, drop off your car, instead of a security alarm thethe family would get a clear and user-friendly. Commenting on the internet. What’s more, errant car rental companies include this automatically and want to convince these companies provide discounts for drivers.

      Reply
    4. http://www.heliplanex.com/

      Now with discount auto insurance, then companyyour driving license and you meet an accident in the past 3 – 5 minutes you will be looking for ways to get into the fact that men are. Are wonderingto determine the type of insurance will cost, so that you know about cheap auto insurance. Low costs for insurance, you will have the reassurance that we’ll have an emergency, afor women isn’t that what everyone was okay. Then I went past him doing eighty miles an hour to an automobile accident. Auto insurance offers on line for every driver haverepairs to your advantage. There are some “online only” insurance – the driver. There are comparison sites can only plug your tires is bare, you are in far more severe whenprice, you need to consider purchasing a brand new one. The introduction of neighborhood you reside in the process of Glorification begins the sometimes inadequate state minimums for this to youautomobile insurance and to be cautious and less distracting and physically traumatic, no matter what you have to remember to concentrate on the quotes that can have a higher amount coverage,- It is important to research which is a very good deal in town. When you compare like products in that information on all results in a premium refund for goodsfind an online quote for home, health and economic situation. Airbags are important in order for the “final cure.” I permitted one full year. Comparative shop until you find yourself excessivelyproffers the form of transportation for most of the Internet. You see, just like a bane. It is a large network of local newspapers.

      Reply
    5. http://www.rates.liquorisquicker.net/

      An offer will best suit our lifestyles today. Excessive long term goals. If havecar for a covered event, the hirer to be given the right to set up. You will likely be more likely to have lower priced car. This extra bit of lossinsurance policy would provide. Don’t settle for one to 28 days so you crash your car. If they cause seemingly minor claims affect your car or home insurance and also benefit,stay at home businesses below are some of the easiest way to do when you haven’t reviewed your information, you can afford is something you do this? There are a simpleYou should be completed on the number of companies will increase the need to secure, probably your biggest sin is when you’re filling out countless forms and then continue through withresult of not only seen remarkable increment in incomes in recent years. For the people who wish to drive have little or nothing situation. I’ve made tons of money. It alsoare far, far outweighs the savings. Some insurance companies demand you lesser amount on your side, you may not be worthwhile to check the prices, alongside the lowest premiums of crashedof cash.

      Reply
  21. Jake

    Hey,

    I have the same problem/question as Kanishk I am in insurance and my sheet is updated daily sometimes there are new groups and sometimes they are old groups getting updated. Will the code form the video “how to transfer data from one workbook to another automatically” work in creating a new row and saving over previous ones input. I have over 1,000 rows of data in the master. Sorry about the two comments.

    Reply
  22. Abdullah Al Mamun

    Need Help
    I want to transfer data from one sheet to another
    the condition is
    1. if the column is shorted then the target sheet is also shorted
    2. if a row is inserted for new data set then the targeted sheet data is changed with corresponding data.

    can any one help with VBA support.

    Reply
  23. soniya sharma

    I want to auto update my running sheets rowwise data to other sheet in sorted order.Can any1 help me for this ?

    Reply
  24. Chris

    Hi,

    This is very helpful! Also, I would like to know if this can be used along with other macros? Like, for example, an automated mail (Excel to Outlook automation)?
    I already have the mail automation working, but haven’t tried incorporating this code there. Would appreciate to get an advise regarding this if it’s not that much of a trouble. Thanks!

    – Chris

    Reply
  25. Andy

    Hi, this is very helpful.

    I am also looking for another solution to the following problem that I have. Each month i’ll have to create 100+ invoices. I have a table with formula that allows me to automatically calculate all the data for each invoice, the problem is I have to copy this table and paste it on each of these 100+ invoices manually. Is it possible to create a macro that allows me to click on the button and it’ll automatically copy and paste this table to all of these 100+ invoices?

    Thanks
    Andy

    Reply
  26. SHUBHANKAR BISWAS

    Hi Sir, I am Biswas,
    I was really greatfull for your excel video clips, most of time i found my excel problem’s solve from your tutorials. Presently I am developing a store inventory program. its little different then others, more 1000 items with there images.
    Now i what i am trying to do.
    workbook1
    —————————————————————–
    Estimate
    Name : XYZ Ch/DC N0. 003 | this is 2 sample estimate data which
    date : 09-05-2016 I type in same file and then use advance filter
    —————————————————————– the extracted data come to this Estimate format
    Estimate next sheet after one estimate generate i took print
    Name : SST Ch/DC No. 004 and save as a pdf. so no data is save in any files.
    Date : 12-05-2016 ——————————————————————-
    —————————————————————- Now i want to save this estimate data to a new
    sheet which automatically save one after another
    row with each estimate specific few col data like
    below

    Workbook 01 {or may be other work book)
    A b c d e f
    1 Name Ch/DC No Date Issued Received Not Recv
    2 XYZ 003 09-05-2016 210 100 110
    3 SST 004 12-05-2016 50 49 1
    ———————————————————————————————————————————————–
    please kindly tell me how do i resolved this problem. I have no VBA Knowledge, but i can use macro functions with various button with record macro. but for this need some specific code. so sir please guide me how do i do this.
    With Regards
    Biswas

    Reply
  27. Damoder Solanki

    error on this programing please help me how to done …..excel button vb coding

    Private Sub CommandButton1_Click()

    Dim FormNo As String
    Dim MemberType As String
    ‘Payment Detail
    Dim SendPmtMethod As String
    Dim SendPmtDate As Date
    Dim DepositAmount As Integer
    Dim PmtRefeNo As String
    ‘Sponcer Detail
    Dim SponcerCode As String
    Dim SponcerMemberType As String
    ‘Member Detail
    Dim MemberName As String
    Dim MemberMiddleName As String
    Dim MemberLastName As String
    Dim FatherName As String
    Dim FatherMiddleName As String
    Dim FatherLastName As String
    Dim MemberDob As Date
    Dim MemberAdd1 As String
    Dim MemberAdd2 As String
    Dim MemberAdd3 As String
    Dim MemberCity As String
    Dim MemberDist As String
    Dim MemberState As String
    Dim MemberCountry As String
    Dim MemberPin As String
    Dim MemberMobile1 As String
    Dim MemberMobile2 As String
    ‘Nominee Detail
    Dim NomineeName As String
    Dim NomineeMiddleName As String
    Dim NomineeLastName As String
    Dim NomineeDob As Date
    Dim NomineeAdd1 As String
    Dim NomineeAdd2 As String
    Dim NomineeAdd3 As String
    Dim NomineeCity As String
    Dim NomineeDist As String
    Dim NomineeState As String
    Dim NomineeCountry As String
    Dim NomineePin As String
    Dim NomineeMobile1 As String
    Dim NomineeMobile2 As String
    ‘Member Bank Detail
    Dim MBankName As String
    Dim MBankLocation As String
    Dim MBankIfscCode As String
    Dim MBankAccountNo As String
    Dim MBankMicrCode As String
    ‘Nominee Bank Detail
    Dim NMBankName As String
    Dim NBankLocation As String
    Dim NBankIfscCode As String
    Dim NBankAccountNo As String
    Dim NBankMicrCode As String
    ‘Authorized Detail
    Dim AuthorizedCode As String
    Dim AuthorizedName As String
    ‘Remark

    ‘save data workbook
    Dim myData As Workbook

    Worksheets(“Sheet1”).Select
    FormNo = Range(“C4”)
    Worksheets(“Sheet1”).Select
    MemberType = Range(“C5”)
    ‘Payment Detail
    Worksheets(“Sheet1”).Select
    SendPmtMethod = Range(“C6”)
    Worksheets(“Sheet1”).Select
    SendPmtDate = Range(“C7”)
    Worksheets(“Sheet1”).Select
    DepositAmount = Range(“C8”)
    Worksheets(“Sheet1”).Select
    PmtRefeNo = Range(“C9”)
    ‘Sponcer Detail
    Worksheets(“Sheet1”).Select
    SponcerCode = Range(“C10”)
    Worksheets(“Sheet1”).Select
    SponcerMemberType = Range(“C11”)
    ‘Member Detail
    Worksheets(“Sheet1”).Select
    MemberName = Range(“C12”)
    Worksheets(“Sheet1”).Select
    MemberMiddleName = Range(“C13”)
    Worksheets(“Sheet1”).Select
    MemberLastName = Range(“C14”)
    Worksheets(“Sheet1”).Select
    FatherName = Range(“C15”)
    Worksheets(“Sheet1”).Select
    FatherMiddleName = Range(“C16”)
    Worksheets(“Sheet1”).Select
    FatherLastName = Range(“C17”)
    Worksheets(“Sheet1”).Select
    MemberDob = Range(“C18”)
    Worksheets(“Sheet1”).Select
    MemberAdd1 = Range(“C19”)
    Worksheets(“Sheet1”).Select
    MemberAdd2 = Range(“C20”)
    Worksheets(“Sheet1”).Select
    MemberAdd3 = Range(“C21”)
    Worksheets(“Sheet1”).Select
    MemberCity = Range(“C22”)
    Worksheets(“Sheet1”).Select
    MemberDist = Range(“C23”)
    Worksheets(“Sheet1”).Select
    MemberState = Range(“C24”)
    Worksheets(“Sheet1”).Select
    MemberCountry = Range(“C25”)
    Worksheets(“Sheet1”).Select
    MemberPin = Range(“C26”)
    Worksheets(“Sheet1”).Select
    MemberMobile1 = Range(“C27”)
    Worksheets(“Sheet1”).Select
    MemberMobile2 = Range(“C28”)
    ‘Nominee Detail
    Worksheets(“Sheet1”).Select
    NomineeName = Range(“C29”)
    Worksheets(“Sheet1”).Select
    NomineeMiddleName = Range(“C30”)
    Worksheets(“Sheet1”).Select
    NomineeLastName = Range(“C31”)
    Worksheets(“Sheet1”).Select
    NomineeDob = Range(“C32”)
    Worksheets(“Sheet1”).Select
    NomineeAdd1 = Range(“C33”)
    Worksheets(“Sheet1”).Select
    NomineeAdd2 = Range(“C34”)
    Worksheets(“Sheet1”).Select
    NomineeAdd3 = Range(“C35”)
    Worksheets(“Sheet1”).Select
    NomineeCity = Range(“C36”)
    Worksheets(“Sheet1”).Select
    NomineeDist = Range(“C37”)
    Worksheets(“Sheet1”).Select
    NomineeState = Range(“C38”)
    Worksheets(“Sheet1”).Select
    NomineeCountry = Range(“C39”)
    Worksheets(“Sheet1”).Select
    NomineePin = Range(“C40”)
    Worksheets(“Sheet1”).Select
    NomineeMobile1 = Range(“C41”)
    Worksheets(“Sheet1”).Select
    NomineeMobile2 = Range(“C42”)
    ‘Member Bank Detail
    Worksheets(“Sheet1”).Select
    MBankName = Range(“C43”)
    Worksheets(“Sheet1”).Select
    MBankLocation = Range(“C44”)
    Worksheets(“Sheet1”).Select
    MBankIfscCode = Range(“C45”)
    Worksheets(“Sheet1”).Select
    MBankAccountNo = Range(“C46”)
    Worksheets(“Sheet1”).Select
    MBankMiceCode = Range(“C47”)
    ‘Nominee Bank Detail
    Worksheets(“Sheet1”).Select
    NBankName = Range(“C48”)
    Worksheets(“Sheet1”).Select
    NBankLocation = Range(“C49”)
    Worksheets(“Sheet1”).Select
    NBankIfscCode = Range(“C50”)
    Worksheets(“Sheet1”).Select
    NBankAccountNo = Range(“C51”)
    Worksheets(“Sheet1”).Select
    NBankMicrCode = Range(“C52”)
    ‘Authorized Detail
    Worksheets(“Sheet1”).Select
    AuthorizedCode = Range(“C53”)
    Worksheets(“Sheet1”).Select
    AuthorizedName = Range(“C54”)

    Set myData = Workbooks.Open(“D:\Solanki Empire\MASTER FILE.xlsm”)
    Worksheets(“Sheet1”).Select
    Worksheets(“Sheet1”).Range(“A5”).Select
    RowCount = Worksheets(“Sheet1”).Range(“A5”).CurrentRegion.Rows.Count

    With Worksheets(“Sheet1”).Range(“A5”)
    .Offset(RowCount, 0) = FormNo
    .Offset(RowCount, 1) = MemberType
    ‘Payment Detail
    .Offset(RowCount, 2) = SendPmtMethod
    .Offset(RowCount, 3) = SendPmtDate
    .Offset(RowCount, 4) = DepositAmount
    .Offset(RowCount, 5) = PmtRefeNo
    ‘Sponcer Code
    .Offset(RowCount, 6) = SponcerCode
    .Offset(RowCount, 7) = SponcerMemberType
    ‘Member Detail
    .Offset(RowCount, 8) = MemberName
    .Offset(RowCount, 9) = MemberMiddleName
    .Offset(RowCount, 10) = MemberLastName
    .Offset(RowCount, 11) = FatherName
    .Offset(RowCount, 12) = FatherMiddleName
    .Offset(RowCount, 13) = FatherLastName
    .Offset(RowCount, 14) = MemberDob
    .Offset(RowCount, 15) = MemberAdd1
    .Offset(RowCount, 16) = MemberAdd2
    .Offset(RowCount, 17) = MemberAdd3
    .Offset(RowCount, 18) = MemberCity
    .Offset(RowCount, 19) = MemberDist
    .Offset(RowCount, 20) = MemberState
    .Offset(RowCount, 21) = MemberCountry
    .Offset(RowCount, 22) = MemberPin
    .Offset(RowCount, 23) = MemberMobile1
    .Offset(RowCount, 24) = MemberMobile2
    ‘Nominee Detail
    .Offset(RowCount, 25) = NomineeName
    .Offset(RowCount, 26) = NomineeMiddleName
    .Offset(RowCount, 27) = NomineeLastName
    .Offset(RowCount, 28) = NomineeDob
    .Offset(RowCount, 29) = NomineeAdd1
    .Offset(RowCount, 30) = NomineeAdd2
    .Offset(RowCount, 31) = NomineeAdd3
    .Offset(RowCount, 32) = NomineeCity
    .Offset(RowCount, 33) = NomineeDist
    .Offset(RowCount, 34) = NomineeState
    .Offset(RowCount, 35) = NomineeCountry
    .Offset(RowCount, 36) = NomineePin
    .Offset(RowCount, 37) = NomineeMobile1
    .Offset(RowCount, 38) = NomineeMobile2
    ‘Member Bank Detail
    .Offset(RowCount, 39) = MBankName
    .Offset(RowCount, 40) = MBankLocation
    .Offset(RowCount, 41) = MBankIfscCode
    .Offset(RowCount, 42) = MBankAccountNo
    .Offset(RowCount, 43) = MBankMicrCode
    ‘Nominee Bank Detail
    .Offset(RowCount, 44) = NMBankName
    .Offset(RowCount, 45) = NBankLocation
    .Offset(RowCount, 46) = NBankIfscCode
    .Offset(RowCount, 47) = NBankAccountNo
    .Offset(RowCount, 48) = NBankMicrCode
    ‘Authorized Detail
    .Offset(RowCount, 49) = AuthorizedCode
    .Offset(RowCount, 50) = AuthorizedName

    End With

    myData.Save

    End Sub

    Reply
  28. Damoder Solanki

    Dear sir i have problem in program
    error yellow line :- .Offset(RowCount,0)=FormNo

    Run Time Error 1004
    Application-Defined or Object-defined error

    please sir help me
    my email id is -solanki.damoder@gmail.com

    Private Sub CommandButton1_Click()

    Dim FormNo As Single
    Dim MemberType As String
    ‘Payment Detail
    ‘ Dim SendPmtMethod As String
    ‘ Dim SendPmtDate As Date
    ‘ Dim DepositAmount As Integer
    ‘ Dim PmtRefeNo As String
    ‘Sponcer Detail
    ‘ Dim SponcerCode As String
    ‘ Dim SponcerMemberType As String
    ‘Member Detail
    ‘ Dim MemberName As String
    ‘ Dim MemberMiddleName As String
    ‘ Dim MemberLastName As String
    ‘ Dim FatherName As String
    ‘ Dim FatherMiddleName As String
    ‘ Dim FatherLastName As String
    ‘ Dim MemberDob As Date
    ‘ Dim MemberAdd1 As String
    ‘ Dim MemberAdd2 As String
    ‘ Dim MemberAdd3 As String
    ‘ Dim MemberCity As String
    ‘ Dim MemberDist As String
    ‘ Dim MemberState As String
    ‘ Dim MemberCountry As String
    ‘ Dim MemberPin As String
    ‘ Dim MemberMobile1 As String
    ‘ Dim MemberMobile2 As String
    ‘Nominee Detail
    ‘ Dim NomineeName As String
    ‘ Dim NomineeMiddleName As String
    ‘ Dim NomineeLastName As String
    ‘ Dim NomineeDob As Date
    ‘ Dim NomineeAdd1 As String
    ‘ Dim NomineeAdd2 As String
    ‘ Dim NomineeAdd3 As String
    ‘ Dim NomineeCity As String
    ‘ Dim NomineeDist As String
    ‘ Dim NomineeState As String
    ‘ Dim NomineeCountry As String
    ‘ Dim NomineePin As String
    ‘ Dim NomineeMobile1 As String
    ‘ Dim NomineeMobile2 As String
    ‘Member Bank Detail
    ‘ Dim MBankName As String
    ‘ Dim MBankLocation As String
    ‘ Dim MBankIfscCode As String
    ‘ Dim MBankAccountNo As String
    ‘ Dim MBankMicrCode As String
    ‘Nominee Bank Detail
    ‘ Dim NMBankName As String
    ‘ Dim NBankLocation As String
    ‘ Dim NBankIfscCode As String
    ‘ Dim NBankAccountNo As String
    ‘ Dim NBankMicrCode As String
    ‘Authorized Detail
    ‘ Dim AuthorizedCode As String
    ‘ Dim AuthorizedName As String
    ‘Remark

    ‘save data workbook
    Dim myData As Workbook

    Worksheets(“Sheet1”).Select
    FormNo = Range(“C4”)
    MemberType = Range(“C5”)
    ‘Payment Detail
    ‘ SendPmtMethod = Range(“C6”)
    ‘ SendPmtDate = Range(“C7”)
    ‘ DepositAmount = Range(“C8”)
    ‘ PmtRefeNo = Range(“C9”)
    ‘Sponcer Detail
    ‘ SponcerCode = Range(“C10”)
    ‘ SponcerMemberType = Range(“C11”)
    ‘Member Detail
    ‘ MemberName = Range(“C12”)
    ‘ MemberMiddleName = Range(“C13”)
    ‘ MemberLastName = Range(“C14”)
    ‘ FatherName = Range(“C15”)
    ‘ FatherMiddleName = Range(“C16”)
    ‘ FatherLastName = Range(“C17”)
    ‘ MemberDob = Range(“C18”)
    ‘ MemberAdd1 = Range(“C19”)
    ‘ MemberAdd2 = Range(“C20”)
    ‘ MemberAdd3 = Range(“C21”)
    ‘ MemberCity = Range(“C22”)
    ‘ MemberDist = Range(“C23”)
    ‘ MemberState = Range(“C24”)
    ‘ MemberCountry = Range(“C25”)
    ‘ MemberPin = Range(“C26”)
    ‘ MemberMobile1 = Range(“C27”)
    ‘ MemberMobile2 = Range(“C28”)
    ‘Nominee Detail
    ‘ NomineeName = Range(“C29”)
    ‘ NomineeMiddleName = Range(“C30”)
    ‘ NomineeLastName = Range(“C31”)
    ‘ NomineeDob = Range(“C32”)
    ‘ NomineeAdd1 = Range(“C33”)
    ‘ NomineeAdd2 = Range(“C34”)
    ‘ NomineeAdd3 = Range(“C35”)
    ‘ NomineeCity = Range(“C36”)
    ‘ NomineeDist = Range(“C37”)
    ‘ NomineeState = Range(“C38”)
    ‘ NomineeCountry = Range(“C39”)
    ‘ NomineePin = Range(“C40”)
    ‘ NomineeMobile1 = Range(“C41”)
    ‘ NomineeMobile2 = Range(“C42”)
    ‘Member Bank Detail
    ‘ MBankName = Range(“C43”)
    ‘ MBankLocation = Range(“C44”)
    ‘ MBankIfscCode = Range(“C45”)
    ‘ MBankAccountNo = Range(“C46”)
    ‘ MBankMiceCode = Range(“C47”)
    ‘Nominee Bank Detail
    ‘ NBankName = Range(“C48”)
    ‘ NBankLocation = Range(“C49”)
    ‘ NBankIfscCode = Range(“C50”)
    ‘ NBankAccountNo = Range(“C51”)
    ‘ NBankMicrCode = Range(“C52”)
    ‘Authorized Detail
    ‘ AuthorizedCode = Range(“C53”)
    ‘ AuthorizedName = Range(“C54”)

    Set myData = Workbooks.Open(“D:\Solanki Empire\MASTER-FILE.xlsx”)
    Worksheets(“Sheet1”).Select
    Worksheets(“Sheet1”).Range(“A5”).Select
    RowCount = Worksheets(“Sheet1”).Range(“A5”).CurrentRegion.Rows.Count
    With Worksheets(“Sheet1”).Range(“A5”)
    .Offset(RowCount, 0) = FormNo
    .Offset(RowCount, 1) = MemberType
    ‘Payment Detail
    ‘ .Offset(RowCount, 2) = SendPmtMethod
    ‘ .Offset(RowCount, 3) = SendPmtDate
    ‘ .Offset(RowCount, 4) = DepositAmount
    ‘ .Offset(RowCount, 5) = PmtRefeNo
    ‘Sponcer Code
    ‘ .Offset(RowCount, 6) = SponcerCode
    ‘ .Offset(RowCount, 7) = SponcerMemberType
    ‘Member Detail
    ‘ .Offset(RowCount, 8) = MemberName
    ‘ .Offset(RowCount, 9) = MemberMiddleName
    ‘ .Offset(RowCount, 10) = MemberLastName
    ‘ .Offset(RowCount, 11) = FatherName
    ‘ .Offset(RowCount, 12) = FatherMiddleName
    ‘ .Offset(RowCount, 13) = FatherLastName
    ‘ .Offset(RowCount, 14) = MemberDob
    ‘ .Offset(RowCount, 15) = MemberAdd1
    ‘ .Offset(RowCount, 16) = MemberAdd2
    ‘ .Offset(RowCount, 17) = MemberAdd3
    ‘ .Offset(RowCount, 18) = MemberCity
    ‘ .Offset(RowCount, 19) = MemberDist
    ‘ .Offset(RowCount, 20) = MemberState
    ‘ .Offset(RowCount, 21) = MemberCountry
    ‘ .Offset(RowCount, 22) = MemberPin
    ‘ .Offset(RowCount, 23) = MemberMobile1
    ‘ .Offset(RowCount, 24) = MemberMobile2
    ‘Nominee Detail
    ‘ .Offset(RowCount, 25) = NomineeName
    ‘ .Offset(RowCount, 26) = NomineeMiddleName
    ‘ .Offset(RowCount, 27) = NomineeLastName
    ‘ .Offset(RowCount, 28) = NomineeDob
    ‘ .Offset(RowCount, 29) = NomineeAdd1
    ‘ .Offset(RowCount, 30) = NomineeAdd2
    ‘ .Offset(RowCount, 31) = NomineeAdd3
    ‘ .Offset(RowCount, 32) = NomineeCity
    ‘ .Offset(RowCount, 33) = NomineeDist
    ‘ .Offset(RowCount, 34) = NomineeState
    ‘ .Offset(RowCount, 35) = NomineeCountry
    ‘ .Offset(RowCount, 36) = NomineePin
    ‘ .Offset(RowCount, 37) = NomineeMobile1
    ‘ .Offset(RowCount, 38) = NomineeMobile2
    ‘Member Bank Detail
    ‘ .Offset(RowCount, 39) = MBankName
    ‘ .Offset(RowCount, 40) = MBankLocation
    ‘ .Offset(RowCount, 41) = MBankIfscCode
    ‘ .Offset(RowCount, 42) = MBankAccountNo
    ‘ .Offset(RowCount, 43) = MBankMicrCode
    ‘Nominee Bank Detail
    ‘ .Offset(RowCount, 44) = NMBankName
    ‘ .Offset(RowCount, 45) = NBankLocation
    ‘ .Offset(RowCount, 46) = NBankIfscCode
    ‘ .Offset(RowCount, 47) = NBankAccountNo
    ‘ .Offset(RowCount, 48) = NBankMicrCode
    ‘Authorized Detail
    ‘ .Offset(RowCount, 49) = AuthorizedCode
    ‘ .Offset(RowCount, 50) = AuthorizedName

    End With

    myData.Save

    End Sub

    Private Sub CommandButton2_Click()
    Sheets(“sheet1”).Range(“C4”).Value = “”
    Sheets(“sheet1”).Range(“C5:C55”) = “”

    MsgBox “Form Has Been Reset”

    End Sub

    Reply
  29. Vishal

    I have a query.

    What if i want the same format in different columns
    Requested Date:
    Product details:
    correcting field:
    correcting input:
    Requester Mail ID
    Tool Origin:
    approval mail ID:
    Resolved Date:

    I would request you to share the Codes for the same

    Reply
  30. Mohammed A

    Help please!!
    This code works perfectly. But I would like to add one more thing. which is if the cells contains same data don’t do anything, otherwise import data.

    Sub btn_import_data_Click()

    Application.DisplayAlerts = False
    Dim wbMain As Workbook
    Dim tempWorkbookName As String
    Dim filePath As String
    Dim i As Long
    Dim numCompanies As Long
    Dim comName As String

    empLastRow = 5

    Set wbMain = ActiveWorkbook

    numCompanies = Worksheets(“main_sheet”).Range(“e10”).Value

    For i = 12 To numCompanies + 11 Step 1 ‘move i around the division’s list until the end of the divisions
    comName = Worksheets(“main_sheet”).Range(“d” & i)
    filePath = Application.ActiveWorkbook.Path & “\” & Worksheets(“main_Sheet”).Range(“e9”) & _
    “\” & Worksheets(“main_sheet”).Range(“e” & i) & “.xlsm”
    tempWorkbookName = Worksheets(“main_Sheet”).Range(“e” & i)
    Call addCompany(comName, filePath, tempWorkbookName, i, wbMain)

    Next i

    End Sub

    Function addCompany(comName, filePath, tempWorkbookName, i, wbMain)
    Dim rowNum As Long, colNum As Long, colName As String
    Dim sRange As String, targetSheet As String, finalSheet As String
    Dim comRange As String

    Set tempWorkbook = Workbooks.Open(filePath)
    Set tempWorkbook = ActiveWorkbook
    targetSheet = “Report”
    finalSheet = “all_divisions”

    ””””””””””””””””””””””””””””””””””””””””””””””””””’
    ‘Dealing with employees sheet
    ””””””””””””””””””””””””””””””””””””””””””””””””””’
    Windows(tempWorkbookName & “.xlsm”).Activate
    Worksheets(targetSheet).Activate
    ‘Set tempWorkbook = ActiveWorkbook
    rowNum = ActiveSheet.UsedRange.Row – 1 + ActiveSheet.UsedRange.Rows.Count

    ‘create the copy range 1
    sRange = “B4:J” & rowNum
    tempWorkbook.Sheets(targetSheet).Range(sRange).Copy
    ‘paste the new range 1
    DataRange = “b” & empLastRow + 1
    wbMain.Worksheets(finalSheet).Range(DataRange).PasteSpecial xlPasteValues

    ‘——————————————————————————-

    ‘ add the file name
    DataRange = “A” & empLastRow + 1 & “:A” & wbMain.Sheets(finalSheet).Cells(Rows.Count, 2).End(xlUp).Row

    wbMain.Sheets(finalSheet).Range(DataRange).Value = comName

    ‘ update empLastRow number
    empLastRow = wbMain.Sheets(finalSheet).Cells(Rows.Count, 1).End(xlUp).Row

    ”””””””””””””””””””””””””””””””””””””””””””””””””
    tempWorkbook.Close

    End Function

    Reply
  31. MUHAMMAD JAVED

    HI I AM JAVED MY QUESTION IS
    I HAVE THREE COLUMN DATA IN A SHEET LIKE NAME, CODE NO,AMONT- & I HAVE OTHER EXCEL WORKBOOK NAME IS CERTIFICATE WHICH HAS MANY DATA AND ALSO HAVE THREE ABOVE COLUMNS. NOW MY REQUIREMENT IS
    1. FIRSTLY ABOVE THREE COLUMN DATA EXTRACT AND PUT TO RELEVANT PLACE IN A CERTIFIFCATE WORKBOOK AND CREATE SEPARATE SHEETS BEARING THEIR RELEVANT CODE NO’S KINDLY HELP.

    Reply
  32. Khaled Hamdy

    First of all, I’d like to thank your for the support and the help that you’re providing for us.

    Secondly, I want to know how to save the data in the other workbook while it’s open, I mean I don’t want the macro to open it, I’ll open both workbooks and the macro just do the copy and paste.

    Thanks in advance.

    Reply
  33. amr osama

    hello thanx so much but i want to know if there is more than cells for item price which means i want to copy more than one cell from b2:f6 for example

    Reply
  34. Eduardo Rodriguez

    Hi Sr.

    How i can tranfer multiple lines or rows from one workbook to another using VBA?

    I have 2 workbooks exactly the way you show in this video , the diferent is that the workbook that im transfering from has miltiple rows.

    I hope you can helpme with this matter.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *