Results 1 to 8 of 8

High light only "Expired" names that ARE NOT duplicates

Threaded View

  1. #1
    Registered User
    Join Date
    02-05-2024
    Location
    United States
    MS-Off Ver
    Microsoft 365
    Posts
    10

    High light only "Expired" names that ARE NOT duplicates

    question1.png

    Hello everyone ! Im new to excel MACRO and working on a project.

    I need to highlight "expired" names that are not duplicates. How can I tell my code to highlight non duplicate "expired" names?
    In the example above, I DO NOT want Lauren highlighted because she is a duplicate.




    Sub Test2()
    
    Dim count, i As Long
    
    count = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
    i = 2
    Do While i <= count
    
        If Cells(i, 3).Value Like "Expired" Then
        Range(Cells(i, 1), Cells(i, 5)).Interior.Color = RGB(230, 98, 76)
        
        ElseIf Cells(i, 3).Value Like "New" Then
        Range(Cells(i, 1), Cells(i, 5)).Interior.Color = RGB(118, 234, 62)
        
        End If
        
        i = i + 1
        Loop
    
    End Sub
    Last edited by AliGW; 02-21-2024 at 12:33 PM. Reason: Code tags added - please review the forum guidelines.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula to count "low", "med", or "high" in 4 columns of data split by fiscal quarter
    By Kerry1980 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-11-2022, 06:58 AM
  2. [SOLVED] Match Names and add "1" to duplicates
    By majime01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-28-2015, 04:09 PM
  3. [SOLVED] Reverse personal names from "First Last" to "Last, First" and accommodate middle names
    By MrGadget6977 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-17-2013, 07:10 PM
  4. Replies: 2
    Last Post: 09-25-2012, 12:53 AM
  5. Excel Function that differentiates "male" from "female" names with 900+ names
    By doylehargrove in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-17-2012, 06:00 PM
  6. "Expired" and "Live" dates.
    By Paul1234 in forum Excel General
    Replies: 2
    Last Post: 03-18-2010, 07:34 AM
  7. Macro that runs entered value through "low" and "high" range
    By Vika.F in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2005, 03:35 AM

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