+ Reply to Thread
Results 1 to 4 of 4

Need help getting row count dependant on 2 variables

  1. #1
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Need help getting row count dependant on 2 variables

    Need help coming up with a script that will find the number of rows(related to invoices) for each vendor. Attached is a sample file that shows the how the data is formatted. Original data needs to stay intact, every thing is being return to a seperate tab. I need to get the row count starting from 3 rows down from each row that contains the text "Vendor" to the row before the row that contains " USD" or "--". The way I originally tried to get the count was like this

    Please Login or Register  to view this content.
    but it counts all the rows for the report.

    vendor is defined like this
    Please Login or Register  to view this content.
    thanks in advance, s4

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need help getting row count dependant on 2 variables

    There are a number of approaches you could use here and I am not entirely sure you need code for this as it seems your data is fixed width, for ex.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Using your sample the above would return 42.

  3. #3
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Need help getting row count dependant on 2 variables

    The goal is to build a database from a file similar to the sample file I attched. I am trying to write a macro that will accomplish that but I need a way to find how many records exist for each vendor so I can return the correct rows to the new database I am building.

  4. #4
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Need help getting row count dependant on 2 variables

    do you know a way to return that value for each vendor? that would accomplish what I need. thanks

+ 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