+ Reply to Thread
Results 1 to 2 of 2

Count number of rows until certain value and run another macro based on the count value

  1. #1
    Registered User
    Join Date
    01-11-2021
    Location
    Brighton
    MS-Off Ver
    365
    Posts
    85

    Count number of rows until certain value and run another macro based on the count value

    I need to open various files and depending on the count between cell A1 (value = Identity) and the next instance of (Identity) - in the example attached the count would be 20, as the second instance of Identity is row 21. I then need - if the count equals 20, run macro1 - if the count equals 21, run macro2 etc...

    Many thanks for your help
    Attached Files Attached Files
    Last edited by Chanty; 02-25-2021 at 10:18 AM.

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Count number of rows until certain value and run another macro based on the count valu

    Hi, maybe you can use this one:

    Please Login or Register  to view this content.
    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

+ 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. [SOLVED] Count number of types - but refine count based on first 8 digits of a number
    By lacke81c in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-23-2018, 02:03 PM
  2. Replies: 3
    Last Post: 11-18-2013, 02:06 AM
  3. [SOLVED] Filtering macro, count number of rows and include count in last column.
    By Folshot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2012, 07:17 AM
  4. [SOLVED] Inserting number of rows based on a count of data
    By Ranelagh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2012, 10:30 AM
  5. [SOLVED] Count Rows Based On User Input & Trigger Print Of Pages Out Of Count Result
    By wliang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2012, 02:45 AM
  6. Count number for rows, based on status
    By maximpinto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2009, 04:13 AM
  7. Replies: 0
    Last Post: 01-05-2005, 09:31 AM

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