+ Reply to Thread
Results 1 to 2 of 2

Macro to Run Based on Cell Value

  1. #1
    Registered User
    Join Date
    11-28-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    8

    Macro to Run Based on Cell Value

    I currently have a macro that checks to see if a number range is found in a data file and if one is it will input a yes into an adjacent column.

    Please Login or Register  to view this content.
    After this macro tells me which rows contain the numerical values I need it to then do validation checks to look for gaps in information. My goal would be to have it run only on cells that have the "Yes" in the specific column and for those rows target specific cells to see if they are blank or a certain character length. However, I do not know how to specify for Excel to only check certain rows for these data gaps based on a cell value, as I would know only how to do it for a range which would look at unnecessary rows. Below is a general idea of the format I would want, but I do not know how to have it only run for the specific rows.

    Please Login or Register  to view this content.
    I appreciate any help.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Macro to Run Based on Cell Value

    Hi, mrmoc85,

    maybe use the Autofilter and SpecialCells(xlCellTypeVisible) for that (and maybe add a check for the last line to be greater or equal if the first row is showing the headers):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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