+ Reply to Thread
Results 1 to 10 of 10

Creating excel file for the names of nonusable files

  1. #1
    Registered User
    Join Date
    03-23-2010
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    7

    Creating excel file for the names of nonusable files

    Hi,
    I have been devised a maros for my department.This main macro extracts data from 60 / 70 excel files in folder.If the row 6 of the data files is not filled, then macro is not allowed to extract data from that file. I want to get the names of the files whose data is not extracted by macros.I am also attaching the macros and data file folder for example.(please adjust maro link locallt to your machine and then to folder)

    Will you help me in this?

    Regards,

    Harry
    Last edited by Harpreet; 04-07-2010 at 05:44 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating excel file for the names of nonusable files

    1) Add this to your Dims:
    Please Login or Register  to view this content.

    2) Expand this section to use the string when needed:
    Please Login or Register  to view this content.

    Then put this at the very end to show your list:
    Please Login or Register  to view this content.
    You can always write that out somewhere, too.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-23-2010
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Creating excel file for the names of nonusable files

    I am very thankfull to you for the reply.Can i have the result in different excel sheet, as i need to have record of this? I will really appreciate this help from your side.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating excel file for the names of nonusable files

    You can skip all that stuff above and do this instead.

    1) Create a sheet called BadList
    2) Edit this one piece of code to write to that sheet
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-23-2010
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Creating excel file for the names of nonusable files

    Hi,
    I tried this code but nothing appears in BadList sheet. Can you enquire , please?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating excel file for the names of nonusable files

    Make it:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-23-2010
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Creating excel file for the names of nonusable files

    Quote Originally Posted by JBeaucaire View Post
    Make it:
    Please Login or Register  to view this content.
    Hi JBeaucaire,

    I am really thankfull to you for the above code. I cpuld not answer you earlier due to my health issues.
    I want one more help from your side if you include the creation of seperate worksheet named as 'Badlis't, in the original macro itself, so that it should be automatically created while running the macros.

    Regards,

    Harpreet singh

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating excel file for the names of nonusable files

    Can you please post up the complete current code as it exists now so I have something to work from? Thanks.

  9. #9
    Registered User
    Join Date
    03-23-2010
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Creating excel file for the names of nonusable files

    Here, i am attaching the file, which extracts the data from 70 / 80 excel files. Badlist worksheet contains the names of the sheets whose row 6 is not filled. My only issue is that i have to create Badlist worksheet as new worksheet, manually, and then the names of excel sheets are written in it by macros. I just want that this sheet should be automatically created with the help of macros.
    I will be really thankfull to you.

    Regards,

    Harpreet Singh
    Attached Files Attached Files

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating excel file for the names of nonusable files

    1) Correct your desktop folder, "REMAINING" is misspelled. (fixed in the macro)

    2) The simplest thing is to add this in the macro before the loops start:

    Please Login or Register  to view this content.

    3) I tried to streamline the whole macro just a wee bit, see if this works for you as a replacement. If not, just add the code in #2 above into your code before the lobjfile loop starts.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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