+ Reply to Thread
Results 1 to 4 of 4

Count Rows/Columns in folder

  1. #1
    Registered User
    Join Date
    08-04-2014
    Location
    London
    MS-Off Ver
    2007
    Posts
    2

    Count Rows/Columns in folder

    Hey guys,
    I’m new to Visual Basic and I want to create a macro that will read excel files within a folder and will count the number of rows and columns. Then it will output the Name/Number of Rows/Number of columns into the current excel file.
    So output will look like this

    Excel File Name Number of Rows Number of Columns

    I have managed a macro to read the files and columns but the output is giving me a hard time.


    any help would be great! thanks in advance!




    Please Login or Register  to view this content.
    Thanks in advance!!
    Last edited by JBeaucaire; 08-04-2014 at 04:39 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Count Rows/Columns in folder

    You're getting the usedrange - why not just rows.count and columns.count?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    08-04-2014
    Location
    London
    MS-Off Ver
    2007
    Posts
    2

    Re: Count Rows/Columns in folder

    Okay ill play with it. Any ideal how i can get the output of the rows to record in column B? (they keep repeating for some odd reason)


    Thanks Again

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Count Rows/Columns in folder

    You're using the ActiveSheet for both - you need to differentiate!

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Count Rows/Columns in folder

    You need to reference the sheet where you want to copy in to.

    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)

Similar Threads

  1. Count number of rows of all files in folder
    By resulgul in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-07-2023, 01:06 AM
  2. Replies: 2
    Last Post: 11-12-2013, 02:11 AM
  3. Count based on rows and columns
    By statenja in forum Excel General
    Replies: 4
    Last Post: 06-23-2009, 04:57 PM
  4. count rows thats not being used between columns
    By Duckie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2009, 12:52 AM
  5. Replies: 2
    Last Post: 01-14-2009, 04:01 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