+ Reply to Thread
Results 1 to 3 of 3

need to flag item when doesnt match the item above it

  1. #1
    Registered User
    Join Date
    05-20-2014
    Posts
    7

    need to flag item when doesnt match the item above it

    number desc
    1_______yellow
    1_______yellow
    1_______blue
    2_______purple
    2_______purple
    3_______green
    3_______orange
    4_______black


    I need some way that can identify when the item in the description column doesnt match the first item of the same number- for example, here the 1-blue and 3-orange would be flagged because they should match the 1-yellow and 3-green.

    I need to do this on a much larger scale (approximately 20,000 data points), so I wanted to create a formula or macro that could do this for me.. I thought making a reference page with would work but I keep getting an error.. I haven't done VBA in a while, so I may have syntax errors.

    If Range("A2:A9").Sheets("Sheet1") = Range("A2:A6").Sheets("Ref") And Range("B2:B9").Sheets("Sheet1") = Range("B2:B6").Sheets("Ref") Then
    Range("C2:C9").Sheets("Sheet1") = "x"
    End If

    Thanks!
    Last edited by mcarp; 05-20-2014 at 10:37 AM. Reason: to make clear that number and desc are two separate columns

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: need to flag item when doesnt match the item above it

    If you want just to flag, why not use just conditional formatting?
    Something like (probably in row1 you have header if not - insert one) CF for A2:BXXX based on formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    05-20-2014
    Posts
    7

    Re: need to flag item when doesnt match the item above it

    Actually this works perfectly thank you!
    Last edited by mcarp; 05-20-2014 at 08:44 AM.

+ 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. UserForm: Search Item in List > Call Table associated with Item > Execute Command
    By TexasAggie12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2014, 12:58 PM
  2. add reminder flag to email item via excel vba
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2013, 09:58 AM
  3. Producing a flag or highlight when an item is 14 days overdue
    By danny06m in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2013, 04:30 AM
  4. Replies: 9
    Last Post: 05-21-2011, 12:14 AM
  5. Taking the next item in a list into 1 of 2 tables based on the previous item time
    By SoleAris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2011, 04:59 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