Create folders programmatically with MS Excel

One of my best friends wanted a software which will generate folders based on an excel sheet.

Guess what I suggested ? Initially Ruby 😅 because I just ❤ it

later, I remembered the most easiest way.

And that is using The Macro feature in Ms Excel.

I am writing this article to explain how you can create your own macro to create folders based on an excel column.

1. Add developer option into your Ms Excel

I hope you have already opened the Ms Excel :). And also skip this step if you have the developer option like bellow in the ribbon.

Ribbon with the developer option

File → Options

Select Customize Ribbon → Tick the developer option

2. Do the Macro

Developer → Visual Basic

This will open a new window. like this

Visual Basic window

Now you have to create a new Module for the task

So Insert → Module

New module

Now Insert the code to generate the folders based on the selected column names

Save it by whatever a name. 😄

3. Last part using a HAPPY DEMO

Go to your excel sheet, type some random names in the sheet.

select the names

Go to developer → Macros

Macros Window

I saved the Macro as MakeFolders,

Just RUN it and see the magic. ❤

Folders created successfully

Enjoy !!!

Happy macro with Excel ❤

--

--

--

Developer ❤️ JS

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ADMAT Bandara

ADMAT Bandara

Developer ❤️ JS

More from Medium

Building H3 with Visual Studio 2022 Preview

[GIGIH 2.0 homework] Time management: 5 Tips to set an accurate deadline

Pixel Art in Excel

HOW TO LEARN PYTHON IN YOUR COFFEE BREAK