+ Reply to Thread
Results 1 to 4 of 4

Error Checking Macro to cycle through rows looking at specific columns for things

  1. #1
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Error Checking Macro to cycle through rows looking at specific columns for things

    Hi Guys,

    I'm not really sure of the best way to do this, but I'm trying to make an error checking macro to find and highlight errors within my sheet.

    I need it to cycle through rows (4 to last row) and if there is any content in that row (from B:Z) ignoring formulas for it to check the following:

    1) Check Column G has an @ symbol somewhere in it, if it doesn't then put a red background on that cell.
    2) Check Column D for a value, if there isn't one then put a red background on that cell. (Do the same for Column F)
    3) Check that the formula in J doesn't return #N/A, if it does, then color the cell 1 to the left with a red background. (In my example I've used #VALUE! for the example)

    In my real sheet there are 25-50 "REQUIRED COLUMN"s and 5~ columns with formulas that need to be checked, some are coloring the cell to the left, some are coloring the cell to the right some are coloring a cell 10 to the right.

    If you look at my example, it would essentially turn MAIN into what AfterExample looks like.

    I would greatly appreciate some help with this.
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Error Checking Macro to cycle through rows looking at specific columns for things

    Hi there,

    Try the following code and see if it does what you need:

    Please Login or Register  to view this content.
    You can change the highlighted values to suit your own worksheet requirements.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Error Checking Macro to cycle through rows looking at specific columns for things

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Error Checking Macro to cycle through rows looking at specific columns for things

    Hi again,

    Many thanks for the Reputation increase - very pleased that I was able to help

    Best regards,

    Greg M

+ 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] macro to copy specific columns and rows for a specific month and week
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2015, 11:23 AM
  2. Macro to delete rows and columns
    By siroco79 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2013, 07:37 AM
  3. [SOLVED] I need a macro to cycle down in a column and add the row value to a specific cell
    By rjackson104 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2013, 12:28 PM
  4. [SOLVED] Cycle through a long set of output and select certain rows/columns for new sheets
    By matrix_machine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2012, 05:32 PM
  5. [SOLVED] Macro code to Copy specific rows into specific columns
    By macrofan2012 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2012, 11:24 AM
  6. [SOLVED] Hyperlinks doing weird things when adding columns or rows
    By hssmith in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-30-2005, 12:25 PM
  7. [SOLVED] Checking specific cell, and identifing how many rows in the sheet
    By Amy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2005, 11:06 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