+ Reply to Thread
Results 1 to 2 of 2

vlookups in vba to extend conditional formatting beyond 3 rules

Hybrid View

  1. #1
    Registered User
    Join Date
    11-12-2007
    Posts
    38

    vlookups in vba to extend conditional formatting beyond 3 rules

    Hey guys, trying to overcome excel 2003's limitation of only 3 conditional format rules being applied to my specified range of cells. Hoping someone may be able to help.
    My problem lies in that my rules involve vlookup's.

    My range is J21:J218 whereby I'd like to apply the following worksheet change rules "COND FORMATTING".

    =vlookup(J21,jas_lookup,2,0) lookup value is 733
    =vlookup(J21,jas_lookup,3,0) lookup value is 734
    =vlookup(J21,jas_lookup,4,0) lookup value is 738
    =vlookup(J21,jas_lookup,6,0) lookup value is 767
    =vlookup(J21,jas_lookup,7,0) lookup value is 767ZX
    =vlookup(J21,jas_lookup,8,0) lookup value is A330
    =vlookup(J21,jas_lookup,9,0) lookup value is A380
    =vlookup(J21,jas_lookup,10,0) lookup value is 747
    =vlookup(J21,jas_lookup,11,0) lookup value is 747RR
    =vlookup(J21,jas_lookup,12,0) lookup value is 738JX

    Unsure how to define "conditions" in vba project module. Got as far as below but got stuck with compile errors regarding "case" definitions.

    Want my colours to change to green for all conditions on "sheet change"



    Private Sub Worksheet_Change(ByVal Target As Range)

    Set I = Intersect(Target, Range("J21:J218"))
    If Not I Is Nothing Then
    Select Case Target










    End Sub


    Hope someone more knowledgable can advise me please !!!

    J

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: vlookups in vba to extend conditional formatting beyond 3 rules

    Why don't you just download Bob Phillips' free addin CFPlus, available here:

    http://www.xldynamic.com/source/xld.....Download.html

    It will give you 30 CFs in each cell.

    Hope this helps.

    Pete

+ 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