Forum Discussion

mspratapreddy's avatar
mspratapreddy
Copper Contributor
Apr 19, 2024

Re: Macro to split excel into separate workbooks

HansVogelaar 

 

Yes, i'd love for them to start the sequence with 1. This would put an end to the little manual intervention required. 

13 Replies

  • HansVogelaar's avatar
    HansVogelaar
    MVP

    mspratapreddy 

    Immediately above the line

                    'Save the file in the new folder and close it

    insert

                    'Fill column A
                    WSNew.Range(WSNew.Range("A2"), WSNew.Range("A1").End(xlDown)).Formula = "=ROW()-1"

     

    • bgehring's avatar
      bgehring
      Copper Contributor

      HansVogelaar This thread has been very helpful.

       

      Is it possible when using a macro to separate data into new workbooks, to drop the data into new files that contain formulas?

       

      For example, we have sales totals for different areas.  The macro allows us to be able to move those sales by area to a new file which is great, but we would like to have some formulas above the data that sum different columns.  So the data would need to drop in on line row 10, instead of row 1.

Resources