Conditional Formatting Simply isnt enough

RickH

New Member
Joined
Oct 5, 2006
Messages
4
Right, iv been having some problems that i thought i had solved until i realised that you can only have 3 entries in the conditional forwarding.

Heres the scenario:

I have a large table of data, of which each entry is categorised as either A,B,C,D or W.

Now, so far i have sorted A,B & C so that if ($M2="??"), where ?? is either A,B or C, it will highlight that whole row either green, cyan or blue.

I have allowed D to stay blank giving me 4 colour options for the category.

However i am left with "W". The only other idea i have had is that i could possibly make the spreadsheet recognise rows with "W" in the Category field, then extract them to a table setup in Sheet 2.

Could anyone please recommend a method to allow me to do this, or perhaps suggest a simpler maybe more effective manner of solving my problem.

Any help would be greatly appreciated.

Richard :)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello

is the data in column M manually entered or is it a formula?
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

THis code needs to go into the relevant sheet code window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 13 Then
    Select Case Target
        Case "A"
        Rows(Target.Row).Interior.ColorIndex = 35
        Case "B"
        Rows(Target.Row).Interior.ColorIndex = 37
    End Select
End If
End Sub

Carry it on yourself for C, D & W, and change color numbers as required.

DO you need code to change already entered data?
 

RickH

New Member
Joined
Oct 5, 2006
Messages
4
The data wont need to change, all that needs to happen is that rows with "X" in column "M" for example, need to be cut out of that sheet and moved into Sheet2
 

RickH

New Member
Joined
Oct 5, 2006
Messages
4
Right, at the moment im testing the forumla on a seperate sheet to make sure i can get it working.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 12 Then
    Select Case Target
        Case "A"
        Rows(Target.Row).Interior.ColorIndex = 33
        Case "B"
        Rows(Target.Row).Interior.ColorIndex = 35
        Case "C"
        Rows(Target.Row).Interior.ColorIndex = 36
        Case "X"
        Rows(Target.Row).Interior.ColorIndex = 38
        Case "W"
        Rows(Target.Row).Interior.ColorIndex = 43
    End Select
End If
End Sub

This is what the code looks like in my code window, now once i click on the field with the A,B,C,W & X in, then click off, only then does the row change colour. How do i make it so it changes as soon as the letter is in there, rather than having to select it.

Are there any other mistakes i have made in editting the code ?
 

Forum statistics

Threads
1,141,625
Messages
5,707,470
Members
421,510
Latest member
haroonstr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top