+ Reply to Thread
Results 1 to 6 of 6

count rows in a HTML table and add the value to a cell in Excel

  1. #1
    Registered User
    Join Date
    08-05-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    count rows in a HTML table and add the value to a cell in Excel

    I would like to have a macro that can be initiated from an excel worksheet to lookup a specific HTML table on our intranet (Radius logins), then count the amount of rows in that table (logins) and add the row count into a cell in excel. I know how to get the actual table into excel but I have over 1200 lookups I need to do so I dont want to import over 1200 tables when all I need to know is the amount of rows.

  2. #2
    Registered User
    Join Date
    08-05-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: count rows in a HTML table and add the value to a cell in Excel

    Actually the page is written in Visual basic .net 7.1. Not sure if this helps

  3. #3
    Registered User
    Join Date
    08-05-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: count rows in a HTML table and add the value to a cell in Excel

    I have figured out the answer but since nobody replied I guess it wasnt of any interest. If anyone needs the answer to this problem I can supply it.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: count rows in a HTML table and add the value to a cell in Excel

    Nice!!

    Maybe You could post it so other's could can take a look at it and also learn something new.

    Thanks.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    08-05-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: count rows in a HTML table and add the value to a cell in Excel

    I found some code on the net and modified it to suit. The original code can be found on http://www.mrexcel.com/forum/showthread.php?t=390072
    My code looks up a table from a web page (Username authentications from a Radius server) then copies the table to a separate sheet (sheet2). Then counts the rows (amount of authentications in 24hrs) in the table and adds the result to the column in sheet 1. With this macro I can run through a thousand or more lookup's in less than a couple of minutes.
    You may have to modify it to suit

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-22-2012 at 08:59 PM. Reason: Added code tags

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: count rows in a HTML table and add the value to a cell in Excel

    @ hahnice

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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