VBA: Create Multiple Folders from Excel Range

Поделиться
HTML-код
  • Опубликовано: 31 янв 2025

Комментарии • 75

  • @gentle2005phir
    @gentle2005phir 6 лет назад +3

    You deserve appreciation. I think now you shud come up with more and more VBA stuffs.

  • @orcademyedtech
    @orcademyedtech 6 лет назад +1

    Mr. PK this video is just too good. I have watched some of your videos in the past and have enjoyed them but this one is just tooooooooo good.

  • @mohankumar-lc3pm
    @mohankumar-lc3pm 6 лет назад +1

    Very useful video expecting more number of videos like this thank you very much

  • @santiagogiraldo1860
    @santiagogiraldo1860 4 года назад +2

    Thank you very much I always struggle with this and finally I found a permanent solution! Great!

  • @skpaul6596
    @skpaul6596 4 года назад +1

    Mr PK ..wonderful application, it save time to create folder...I was struggling it long time..many thanks

  • @jojidodda9138
    @jojidodda9138 5 лет назад

    Mr. PK Good job.....This is excellent video. It is useful for me. Sir Mera Manna hai ki Agar Har folder me kitna Images (JPG, PNG etc) hai. For example:- Har ek folder me 40 se Adhik Images nahi hona chahiye. Iss topic pebhi video bananese bahuth achha hoga. Thank you.............

  • @nairak
    @nairak 4 года назад

    Useful to me ...tweaked a little bit to create standard set of subfolders within a root folder list too!
    Thanks!

    • @JenniSoprano
      @JenniSoprano 4 года назад

      Oo how did you do that?

    • @nairak
      @nairak 4 года назад +2

      @@JenniSoprano I wanted a standard set of folders....So I did as below:
      Sub Create_Multiple_Folders()
      Dim sh As Worksheet
      Set sh = ThisWorkbook.Sheets("Sheet1")
      Dim sub_folder_path As String
      Dim i As Integer
      For i = 2 To sh.Range("A" & Application.Rows.Count).End(xlUp).Row
      sub_folder_path = "C:\Test" & "\" & sh.Range("A" & i).Value
      If Dir(sub_folder_path, vbDirectory) = "" Then
      MkDir (sub_folder_path)
      MkDir sub_folder_path & "\PTT_5G_2020"
      MkDir sub_folder_path & "\PTT_5G_2020\ABC"
      MkDir sub_folder_path & "\PTT_5G_2020\ABC\DRAWINGS"
      MkDir sub_folder_path & "\PTT_5G_2020\ABC\PERMITS"
      sh.Range("B" & i).Value = "Folder created!"
      Else
      sh.Range("B" & i).Value = "Folder Exists!!!"
      End If
      Next i
      MsgBox "Done!"
      End Sub

  • @balasubramanianshanmugam3721
    @balasubramanianshanmugam3721 6 лет назад +3

    Very useful.thanks for your service

  • @bogdanbogdan2943
    @bogdanbogdan2943 6 лет назад +1

    Mr. PK, good job.... Very nice what you do here, but will be more intresting that you will continue with "how to delete one folder". Thank you in advance :-)

    • @PKAnExcelExpert
      @PKAnExcelExpert  6 лет назад

      Thanks for your valuable feedback. I will definitely try to make such video very soon

  • @markdenney4938
    @markdenney4938 4 года назад +1

    Thank you for your excellent instructions!

  • @ProviderKnowledge
    @ProviderKnowledge 2 года назад +1

    Thanks

  • @vijaysahal4556
    @vijaysahal4556 3 года назад

    good sir 👍🏻👍🏻👍🏻👍🏻👍🏻

  • @JoshLearningLibrary
    @JoshLearningLibrary 3 года назад +1

    so great! very helpful

  • @ezelkarlkl1284
    @ezelkarlkl1284 4 года назад

    Thank you for video. Can we do same things for create workbooks. I mean create new workbooks from cell range

  • @xxCarliuxx
    @xxCarliuxx 4 года назад +1

    Thanks so much for your help

  • @KiyaniPlateOfFlavour
    @KiyaniPlateOfFlavour 3 года назад

    Looks nice let me try

  • @PSVRoger
    @PSVRoger 3 года назад

    What a information¡

  • @rakeshbond009
    @rakeshbond009 6 лет назад +1

    Good one Bro. Keep it Up

  • @jasimalmeri1602
    @jasimalmeri1602 4 года назад +1

    It work, amazing good job.

  • @drunkenstefania
    @drunkenstefania 4 года назад

    Thank you very much for this useful video! I just wanted to ask you if there is a way to list the folders created with the macro in the exact order of the rows in the excel list. Thanks

  • @eleanortay2389
    @eleanortay2389 3 года назад

    Thanks for the video! If I have individual files called EMP-1, EMP-2 etc, how do I move them to the new EMP-1, EMP-2 folders created?

  • @interested8430
    @interested8430 3 года назад

    Great video - how would you then once the folder is created make a hyperlink to go directly to that folder from excel through VBA? Many Thanks

  • @ujjawalso
    @ujjawalso 4 года назад +1

    1. can i create the folder with desired excel file in that folder in bulk folders ?
    2. or can I rename of folder with my desired different names of folders ?

  • @kiranarana7274
    @kiranarana7274 4 года назад

    Thank you for your nice tutorial, the question is how can subfolders be created

  • @michaela.brunson8529
    @michaela.brunson8529 4 года назад +1

    Thank you for your tutorial. How can subfolders be created?

    • @PKAnExcelExpert
      @PKAnExcelExpert  4 года назад

      Good question! You can do it after little change in the code. I will try to create a separate video on this topic.

  • @muhammednafiumminiyattil6889
    @muhammednafiumminiyattil6889 5 лет назад

    This is very use full macro and thanks for the vedio.but i have one question.
    Is it possible to create excell sheet for each employees available in the work book in a perticular folder instead of creating folder? If yes, would you please do a vedio for the same.

  • @mayanksakaria6238
    @mayanksakaria6238 6 лет назад +1

    Hi
    Hope you are doing well,
    Your videos are really awesome, I have learned many things from that.
    Justwanted to know do you have any video of automating letters using excel.. For example : if there is a letter template given on certain loaction and i need excel to open that and amend the required fills or empyt fills and create a letter in ms word.

    • @PKAnExcelExpert
      @PKAnExcelExpert  6 лет назад +1

      Thanks for your valuable feedback. I will definitely try to make such video very soon.

  • @Norlen94
    @Norlen94 4 года назад

    Hi Great video. I have a question. Is it possible instead of a predefined directory and range, the user gets to select where the folders would be created and the folders themselves would be based on the cells the user selected? more of a dynamic code.

  • @technicalnekh8202
    @technicalnekh8202 3 года назад

    Thanks you very much sir for your kind sharing. It is very helpful to me.
    But I have a question if Column "A" is writing as a formulas, so how to fix or add in vba. Due to when I try to write as formulas it was error "Path not found".
    My highly appreciated for your kindness to solve this issue for me.
    Again, Thanks you very much sir..
    From Cambodia Country:)

  • @laurentchristophemunier252
    @laurentchristophemunier252 4 года назад

    Thank you so much.

  • @MohAboAbdo
    @MohAboAbdo 6 лет назад +1

    Thanks... Thanks.

  • @SathishJ
    @SathishJ 4 года назад

    Awesome stuff, Can you help me making sub folders with this same technique with some modifications in the programme

  • @EpicShivExplorers
    @EpicShivExplorers 6 лет назад

    Very useful macro
    Sir I need one macro which copy the pertifcular file no. From one folder and paste that files into destination folder please help

  • @govindkumarsodani3290
    @govindkumarsodani3290 2 года назад +1

    usefull😐

  • @MeKavita
    @MeKavita 6 лет назад +1

    Hi, do you have any Vba code for below requirement please confirm
    e.g. Want to create Vba code to pull out d data from SAP application once open d respective tracker, paste d data and run d calculation in Excel tracker that already formulated. Once it's done go to Outlook and sent d mail to scheduled recipients

    • @PKAnExcelExpert
      @PKAnExcelExpert  6 лет назад

      As of now I don't have such video ready. I will definitely try to make such video very soon.

  • @inkarazhumakhanova2643
    @inkarazhumakhanova2643 4 года назад +1

    powerfull

    • @PKAnExcelExpert
      @PKAnExcelExpert  4 года назад +1

      Thanks for your valuable feedback

    • @inkarazhumakhanova2643
      @inkarazhumakhanova2643 4 года назад

      Hi Kumar, do you have any video's and examples of how to print using VBA list of PDF files? I have PDF files saved in a certain folder, there are thousands of PDF files them. Every time i process an order from customer I need to print some certain PDF files from that folder. it can a list of 10 or 20 or just one PDF file. What i would like to create in VBA is - i put a list of file names to be printed from that folder, press a button and they are printed. would be also cool to be able to print certain pages from these PDF files, so for example if i could put next to the list of file names the pages to be printed. and if also the macros can give me a message saying that this or that document could be printed, or some of the files were not found in the folder.
      i dont want to bother you, but i have tried so many videos and did not find so far what i need. i see that most people use shell function. I am medium level VBA user, i do programming good tools, but never met shell. thank you in advance

  • @munuaich9091
    @munuaich9091 5 лет назад +1

    Inside the all folders I want to create subfolders for all , can you please tell me how to do this?

    • @nickblampied8784
      @nickblampied8784 4 года назад

      Munu Aich I would also like to see how you make subfolders within the folders using this method.

    • @nickblampied8784
      @nickblampied8784 4 года назад

      I would also like to see how you could make sub folders using the table method PK

  • @satishnagar-l6z
    @satishnagar-l6z Год назад

    Sir ji mero ko files bhi add karna hai har folder ke inside Mai. Aur condition bhi enter karna hai jisse duplicate files should not fetch inside the folder

  • @jasoncherene6801
    @jasoncherene6801 4 года назад

    Is there a way to get it to work with an ONEDRIVE pathway?

  • @ujjawalso
    @ujjawalso 4 года назад

    i want to put inside the desired files in each folders then how to do it ? please help

  • @sushandutta3824
    @sushandutta3824 4 года назад

    How to do the same in excel, which is located in Microsoft teams?

  • @shawnkohl121
    @shawnkohl121 4 года назад

    under the sub folder path it tells me it doesn't support this value.

    • @shawnkohl121
      @shawnkohl121 4 года назад

      For i = 4 To sh.Range("A" & Application.Rows.Count).End(xlUp).Row
      sub_folder_path = sh.Range("C1").Value & Application.PathSeperator & sh.Range("A" & i).Value

  • @paulsomnath
    @paulsomnath 4 года назад

    getting error that " object does not support this property or method"

  • @point4238
    @point4238 4 года назад

    but it is not creating the hindi name folder

  • @sahebgoswami2499
    @sahebgoswami2499 4 года назад

    One folder create করতে চাই worksheet one cell value থেকে . কিভাবে করব

  • @ProviderKnowledge
    @ProviderKnowledge 2 года назад +1

    Thanks