Results 1 to 9 of 9

Thread: For an active workbook Copy data from template A to template B

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2023
    Posts
    16

    For an active workbook Copy data from template A to template B

    Hi
    Hope you are doing great
    I need an Excel VBA code for an active workbook that copies data from template A to template B
    Details
    I need a macro to copy data from Template A Columns B, C, D, E, F, G, H & J to Template B Columns A, C, E, F, G, H I & J . Template A columns data is dynamic range

    Template A screenshot is attached
    Template B screenshot is attached
    The solution screenshot which I need is attached
    Attached Images Attached Images    

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,398

    Re: For an active workbook Copy data from template A to template B

    Have you tried the macro recorder and then performing the steps manually to see what code you get?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2023
    Posts
    16

    Re: For an active workbook Copy data from template A to template B

    yeah i am trying

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: For an active workbook Copy data from template A to template B

    Quote Originally Posted by Kamran aj View Post
    yeah i am trying
    So what happened when you tried?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2023
    Posts
    16

    Re: For an active workbook Copy data from template A to template B

    please it is very difficult forme by god I tried it by I am failed please help me regarding this

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2023
    Posts
    16

    Re: For an active workbook Copy data from template A to template B

    can we call through google meet so I can discuss this with you?

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: For an active workbook Copy data from template A to template B

    Did you try the macro record or not? if so, what happened? If not, try it and then tell us what happened. Provide the relevant information here, in this thread. That's what it's for, not to recruit people to go elsewhere and tutor you.

  8. #8

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Mar 2023
    Posts
    16

    Re: For an active workbook Copy data from template A to template B

    I reached the half of VBA code please it is not for an active workbook please make it for an active workbook.
    Sub test4()
    '
    ' test4 Macro pass
    '

    '
    Workbooks.Add
    Range("A1").Select
    ActiveCell.FormulaR1C1 = "MB_ID"
    Range("B1").Select
    ActiveCell.FormulaR1C1 = "Website"
    Range("C1").Select
    ActiveCell.FormulaR1C1 = "Business Name"
    Range("D1").Select
    ActiveCell.FormulaR1C1 = "Last Name"
    Range("E1").Select
    ActiveCell.FormulaR1C1 = "Address"
    Range("F1").Select
    ActiveCell.FormulaR1C1 = "Country"
    Range("G1").Select
    ActiveCell.FormulaR1C1 = "City"
    Range("H1").Select
    ActiveCell.FormulaR1C1 = "State"
    Range("I1").Select
    ActiveCell.FormulaR1C1 = "Postal Code"
    Range("J1").Select
    ActiveCell.FormulaR1C1 = "Phone"
    Range("K1").Select
    ActiveCell.FormulaR1C1 = "Email"
    Range("L1").Select
    ActiveCell.FormulaR1C1 = "Business Type"
    Range("M1").Select
    ActiveCell.FormulaR1C1 = "Industry"
    Range("N1").Select
    ActiveCell.FormulaR1C1 = "Lead Import Source"
    Range("N2").Select
    ActiveCell.FormulaR1C1 = "Data Import MB"
    Range("O1").Select
    ActiveCell.FormulaR1C1 = "Contact Type"
    Range("O2").Select
    ActiveCell.FormulaR1C1 = "New Lead"
    Range("P1").Select
    ActiveCell.FormulaR1C1 = "Migrating From"
    Range("P2").Select
    ActiveCell.FormulaR1C1 = "MINDBODY"
    Range("Q1").Select
    ActiveCell.FormulaR1C1 = "Import ID"
    Range("Q2").Select
    ActiveCell.FormulaR1C1 = "KA 2023_May 02, May 04"
    Windows("PERSONAL.XLSB").Activate
    Windows("io_2022-09-16.xlsx").Activate
    End Sub

    Please replace the file name and (io_2022-09-16.xlsx )and make it for any active workbook
    Details
    I make a code but it is on the file name, if i change the workbook name it will not work please make it for an active workbook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width