+ Reply to Thread
Results 1 to 6 of 6

Counting maximum number of consecutive missing values

  1. #1
    Registered User
    Join Date
    11-08-2014
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    84

    Red face Counting maximum number of consecutive missing values

    Hello members,
    May I ask you help me please?

    I have more than 1000 CSV files. I need a macro that could read ALL csv files and write the results ALL in a single .XLS file.
    This is my desired output and I attached a sample input file.
    *Missing values are defined as "?" in my CSV files.
    ** All CSV files are not in a single folder. So I will run it several times for each folder.
    Thank you.

    OUTPUT.png
    Attached Files Attached Files
    Last edited by Moriexcel; 12-18-2014 at 05:55 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Counting maximum number of consecutive missing values

    Here is a bit of code you can work on.
    Please Login or Register  to view this content.

    Workbook Loop

  3. #3
    Registered User
    Join Date
    11-08-2014
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    84

    Re: Counting maximum number of consecutive missing values

    Many thanks the code is helpful and thank you for the link as well.

    By the way, do you have any idea, why I can not find the "?" in my files? either manually or using your code the result for "?" is 0. I learnt when I am filtering the C column, it shows me "~?" has filtered ! I've changed the code to "~?", but still the result is 0.

  4. #4
    Registered User
    Join Date
    11-08-2014
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    84

    Re: Counting maximum number of consecutive missing values

    Does anybody has idea about "counting consecutive values" ?

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Counting maximum number of consecutive missing values

    Try this to get the maximum consecutive ? in each file

    It is based on Davesexcel's excellent work above

    Please Login or Register  to view this content.
    Last edited by Crooza; 12-17-2014 at 11:37 PM.
    Happy with my advice? Click on the * reputation button below

  6. #6
    Registered User
    Join Date
    11-08-2014
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    84

    Re: Counting maximum number of consecutive missing values

    Yes. It works well. Thank you davesexcel and Crooza.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Counting Maximum Consecutive Days
    By Delleeb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-26-2013, 03:51 PM
  2. Counting the maximum consecutive cells by font color
    By moppyau in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2013, 10:01 PM
  3. Sum values from maximum consecutive string
    By kingjas in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-30-2013, 08:12 PM
  4. [SOLVED] count the maximum number consecutive
    By Berna11 in forum Excel General
    Replies: 9
    Last Post: 07-13-2012, 11:27 AM
  5. Replies: 3
    Last Post: 03-29-2011, 11:03 AM

Tags for this Thread

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