Closed Thread
Results 1 to 2 of 2

Count rows and run different macros based on result

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

    Count rows and run different macros based on result

    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

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,375

    Re: Count rows and run different macros based on result

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-pro...unt-value.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Fill automatically cells based on the result of Count
    By Costertje in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-18-2020, 07:07 AM
  2. Count based on result on another cell
    By ashraf999 in forum Excel General
    Replies: 1
    Last Post: 06-09-2020, 05:25 AM
  3. [SOLVED] I use the code to count the visible rows, but why get the wrong result?
    By woshichuanqilz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2017, 02:51 AM
  4. [SOLVED] How to COUNT cell based on either COLOR or correct result?
    By Kagesen in forum Excel General
    Replies: 3
    Last Post: 05-12-2014, 12:40 AM
  5. Macros or mail merge to select data based on critieris, end result of letters.
    By Nicklebach in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 05:19 PM
  6. [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
  7. [SOLVED] Wrong result returned by UsedRange.Rows.Count
    By j in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2005, 04:05 PM

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