Results 1 to 26 of 26

Looking for a code that will save as different names to folder based on data validation

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-12-2021
    Location
    USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    259

    Looking for a code that will save as different names to folder based on data validation

    Hello, to put it as simple as possible, I am looking for a code that will select different choices from a drop-down menu and then save a copy of that tab to a folder.

    Here is a deeper explanation: There are two sheets in this sample workbook. The first one Sheet 1, contains a list of employee numbers, names, and a dept. code they appear in. It also has a key to the side giving a description of the dept. code. On sheet2, the dropdown menu is in cell B8 and is simply from the list in Sheet1 from the range L2 thru L5. When you select a Dept. Code, it will then bring up a matching dept description in B7 as well as a list of people who reside in that dept. starting in Cells A11:B40. So what I'd like to do is have a macro that will select each of these department codes and then save a copy of the file in a folder on the desktop called "Sample". For the file name, I would like it to be whatever is in B8 on sheet 2 and have B7 in the name. So for example if the first Choice in B8 called "Test1" is selected, the File name I would want saved in the folder would be "Test 1 - 1st Shift" and the next choice "Test2" would have a file saved called "Test 2 - 1st Shift Office" and so on and so forth. I've limited the sample to just 4 departments, but it would just basically need to stop at whatever the last dept. is.

    I'm not yet at this kind of proficiency in VBA but I believe this would be some kind of Loop coding? Thank you for your time!

    Also just FYI if it matters OneDrive is used.

    also posted here: https://www.mrexcel.com/board/thread...ation.1246044/
    Attached Files Attached Files
    Last edited by PitchNinja; 09-28-2023 at 03:31 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 10-28-2021, 11:44 AM
  2. [SOLVED] Save outlook attachments to different folder paths based on Domain Names
    By amb2301 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-11-2021, 02:33 AM
  3. Sum Based of names - vba code save as pdf specific range
    By chrismil in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2021, 05:39 PM
  4. [SOLVED] VBA Code to save to a folder within a folder within a folder all based on cell values.
    By Sintek in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-24-2016, 04:24 PM
  5. Need help with code to save file in a folder location based on a cell value
    By msantucci in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2015, 05:56 PM
  6. Code to create New Folder (if doesn't exist) and then Save Workbook to folder
    By jenhawley in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-10-2013, 03:09 PM
  7. Replies: 1
    Last Post: 02-24-2006, 02:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1