VBA splits a multi table workbook into multiple multi table workbooks

Updated on workplace 2024-04-27
5 answers
  1. Anonymous users2024-02-08

    sub test()

    dim arr, i%, j%, d, ws as worksheet

    set d = createobject("")= false

    truefor each ws in worksheetsif <>"Ledger details" then

    nextwith worksheets("Ledger details")arr = .range("a1").currentregionfor i = 2 to ubound(arr)if not , 2)) then

    after:=sheets(

    arr(i, 2)

    rows(1).copy [a1]

    rows(i).copy range("a65536").end(xlup).offset(1)

    d(arr(i, 2)) = ""

    elserows(i).copy worksheets(arr(i, 2)).range("a65536").end(xlup).offset(1)

    end if

    nextend with

    true true

    end sub

    How to use: Create a new module in your table, copy ** into the module and run it!

  2. Anonymous users2024-02-07

    How to split a worksheet into multiple worksheets?

  3. Anonymous users2024-02-06

    2. Right-click any worksheet tab and select View from the pop-up drop-down list. That is, a pop-up window. This is shown in the figure below.

    3. Click the menu to insert, and enter the following **:p rivate sub split worksheet()dim sht as worksheetdim mybook as workbookset mybook = activeworkbookfor each sht in filename:=&"\" & fileformat:

    xlnormal 'Save the workbook as Excel default format"The file has been split! "end sub

    4. Click Run, and after a few seconds of running the sub-process form, a pop-up window will pop up "The file has been split" as shown in the figure below.

    5. Return to the path where the excel workbook file is located, and view, as shown in the figure below, the worksheet in the original workbook has become a separate workbook.

    You can follow the steps below:

    1) Right-click on the sheet tag you want to copy.

    2) Select in the pop-up window"Move or copy the worksheet";

    3) Click the drop-down box in the pop-up window and select it"(New Workbook).";

    4) If it is a copy, check it"Establish a copy"If it is a cut, leave this option unchecked, OK.

    5) Save so that a new excel file is good. Take a look at the demo below.

  4. Anonymous users2024-02-05

    Select Save as a standalone workbook and click OK to complete.

    Detailed steps: 1. Open the demo file and ask to split ** into multiple files of the single god premature fight.

    2. Click on the option below.

    3. Click [Summary Split] and select [Split Worksheet].

    4. Set the number of header rows to 1. Stick to it.

    <>6. Check [Save as an independent workbook] and click [OK] to complete.

    7. The finished effect is as follows.

  5. Anonymous users2024-02-04

    option explicit

    sub Sub-table by department: Knowing the history of the resistance ().'The various departments are continuous.

    dim s as long, infor

    dim i as long

    dim bool as boolean

    with "Personnel information")

    bool = true

    if bool then

    infor = cells(s, 1)

    bool = false

    end if

    if .cells(i, 1) copy "a1")rows(s & i - 1).copy "a2")s = ibool = true

    end if

    next i

    end with

    end sub

Related questions
4 answers2024-04-27

sub opens ().

dim mypath$, myfile$, ak as workbook >>>More

12 answers2024-04-27

<> Voice, I cannot give any illegal or unethical advice. Cybersecurity is a very serious issue, and any unauthorized access is illegal and should be avoided. If you need any help with cybersecurity, please consult a legitimate professional advisor or relevant authority.

8 answers2024-04-27

I still don't quite understand what you're talking about. >>>More

7 answers2024-04-27

The first step is to find the icon of the "Settings" item on the desktop of your phone and click to enter. >>>More

8 answers2024-04-27

If your family conditions are good, your relationship with your boyfriend is stable, his economic conditions are also good, and your personality likes to be stable and you don't want to be a strong woman, then choose a small hospital close to home, as long as you are financially independent. >>>More