1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Splitting a 50 Tab Workbook Into Individual Spreadsheet and Renaming Them Using VBA

Our take

If you're looking to split a 50-tab workbook into individual spreadsheets while renaming each based on a specific cell, you're embarking on an exciting journey into VBA coding. This task not only streamlines your workflow but also enhances your data organization. Your existing code is a great start, but modifying it to reference the desired cell for each spreadsheet's name will elevate your project.

(Apologies in advance for formatting)

Hi, all!

I’m trying to write code that would break down a 50 book into individual spreadsheets. I’m a super beginner, but I have been able to separate all the tabs and save them, but the issue I’m having is renaming them. I would like to rename them using a particular cell on each spreadsheet. For example “Daily Report Vendor __D21___” Is this even possible? When I have attempted this it will reference the vendor/D21 on the active sheet.

The code I posted below is what I started with. I had to make small changes, but it’s mostly the same.

```

Sub ExportToXLSX()

Dim ws As Worksheet

Dim path As String

'Change this path to your desired folder

path = "C:\Users\Username\Desktop\SplitFiles\"

For Each ws In ThisWorkbook.Worksheets

ws.Copy

ActiveWorkbook.SaveAs Filename:=“Daily Report Vendor” & ".xlsx", FileFormat:=xlOpenXMLWorkbook

Next ws

End Sub

```

Sorry if this is obvious. Any help is appreciated

submitted by /u/AndyJCohen
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Tagged with

#natural language processing for spreadsheets#Excel alternatives for data analysis#no-code spreadsheet solutions#generative AI for data analysis#financial modeling with spreadsheets#modern spreadsheet innovations#machine learning in spreadsheet applications#enterprise-level spreadsheet solutions#digital transformation in spreadsheet software#rows.com#collaborative spreadsheet tools#AI-driven spreadsheet solutions#cloud-based spreadsheet applications#automation in spreadsheet workflows#AI-powered spreadsheet#spreadsheet API integration#big data management in spreadsheets#AI-native spreadsheets#Excel compatibility#predictive analytics in spreadsheets