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

Naming a File Using a Certain Cell on Every Sheet.

Our take

Naming files using specific cell values from multiple sheets can streamline your workflow and enhance organization. In this example, a beginner VBA user seeks assistance in automatically populating file names with values from cell D21 across all tabs in their workbook. While they have successfully named files from a single sheet, they want to extend this functionality. By leveraging the active workbook's SaveAs method and referencing the desired cells, you can create a dynamic and informative naming convention for your files.

Hey everyone!

I'm a beginner vba user. I'm trying to name my files and using d21 from every tab in the workbook. I have figured out how to name it if i only have one sheet, but I would like to be able to automatically populate a name with d21 from each sheet. Any help would be appreciated.

 ActiveWorkbook.SaveAs Filename:="RA REQUEST " & ActiveSheet.Range("D22") & " VEN " & ActiveSheet.Range("D21") & " BL-" & Range("D2").Value & " " & Left(Range("D5").Value, 8) & ".xlsx", FileFormat:=xlOpenXMLWorkbook 
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

#rows.com#Excel compatibility#Excel alternatives for data analysis#financial modeling with spreadsheets#no-code spreadsheet solutions#Excel alternatives#VBA#ActiveWorkbook#SaveAs#Filename#Range#d21#d22#sheet#workbook#automatic#populate#Excel#filename creation#BL-