+ Reply to Thread
Results 1 to 4 of 4

Multiple Function issue

Hybrid View

  1. #1
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple Function issue

    Try this, remove all the other code and replace with:
    Option Compare Text 'A=a, B=b, ... Z=z
    Option Explicit
     
    Sub Worksheet_Change(ByVal Target As Range)
    Dim Cell As Range
    Application.EnableEvents = False
    On Error GoTo ErrorExit
        
        For Each Cell In Target
            Select Case Cell.Value
                Case vbNullString
                    Cell.Interior.ColorIndex = xlNone
                    Cell.Font.Bold = False
                Case "URGENT"
                    Cell.Interior.ColorIndex = 3
                    Cell.Font.Bold = True
                Case "Incoming"
                    Cell.Interior.ColorIndex = 17
                    Cell.Font.Bold = False
                Case "To Do"
                    Cell.Interior.ColorIndex = 6
                    Cell.Font.Bold = True
                Case "Outgoing"
                    Cell.Interior.ColorIndex = 46
                    Cell.Font.Bold = False
                Case "Completed"
                    Cell.EntireRow.Copy
                    Worksheets("Completed").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValuesAndNumberFormats
                    Cell.EntireRow.Delete
                Case Else
                    Cell.Interior.ColorIndex = xlNone
                    Cell.Font.Bold = False
            End Select
        Next
        
    ErrorExit:
    Application.EnableEvents = True
    End Sub
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  2. #2
    Registered User
    Join Date
    03-09-2010
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Multiple Function issue

    Yes works perfectly. Thanks for your help.

+ 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