+ Reply to Thread
Results 1 to 2 of 2

VBA Cell Analysis

Hybrid View

  1. #1
    Registered User
    Join Date
    08-17-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    VBA Cell Analysis

    Hello,

    I have a spreadsheet of about 5000 rows.

    The sheet is an XML export from a system, I believe that there are some completely unique records with the same first name as other records but slightly possibly different other details (such as address) in other columns.

    However there are too many rows to use a Vlookup with, i have tried this and its slows the application instance of excel down completely.

    I am looking for a way to do something similar to the following in VB

    IF the value in cell A is different to the cells both above and below it (a-1 row & a+1 row) highlight in red

    AND

    Start at row 1 and check if the value of the cell is unique if it is highlight in blue

    Thanks for your help in advance

    i woudl share teh attachement, but it is confidential

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA Cell Analysis

    Hello micah.brown2,

    Welcome to the Forum!

    What you want to do can be done using Conditional Formatting. There is really no need to use VBA in this case.

    Your logic needs some tweaking. If a cell is different from the ones above and below but is not unique then what will the color be?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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