imback2nite
Board Regular
- Joined
- Oct 30, 2004
- Messages
- 211
- Office Version
- 2003 or older
- Platform
- Windows
I was wondering if it was possible to be able to bold and italicize a name from a drop down box. I have a list of names on worksheet 3 that will get longer and shorter. I’ve named the range, Pro. Named Range =OFFSET(Pro!$G$1,0,0,COUNTA(Pro!$G:$G)).
On worksheet 4 I have a grid with drop down boxes. What I would like to happen is if I select a name from worksheet 3 on worksheet 4, it will bold and italicize. This grid will be from A20 to approximately BB70. I will also be using this code below on worksheet 4. I’m using Excel 2003 so I’m not able to use a lot of the new features. Thank you for any help as I’ve been scouring the pages for what I thought would work but..well thanks for any help.
On worksheet 4 I have a grid with drop down boxes. What I would like to happen is if I select a name from worksheet 3 on worksheet 4, it will bold and italicize. This grid will be from A20 to approximately BB70. I will also be using this code below on worksheet 4. I’m using Excel 2003 so I’m not able to use a lot of the new features. Thank you for any help as I’ve been scouring the pages for what I thought would work but..well thanks for any help.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
Dim Rng1 As Range
On Error Resume Next
Set Rng1 = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 1)
On Error GoTo 0
If Rng1 Is Nothing Then
Set Rng1 = Range(Target.Address)
Else
Set Rng1 = Union(Range(Target.Address), Rng1)
End If
For Each Cell In Rng1
If Cell.Value = vbNullString Then
Cell.Resize(, 2).Interior.ColorIndex = xlNone
Cell.Resize(, 2).Font.Bold = False
ElseIf UCase(Cell.Value) Like UCase(Sheet5.Range("K2") & "*") Then
Cell.Resize(, 2).Interior.ColorIndex = 6
ElseIf UCase(ActiveCell.Offset(0, -1).Value) Like UCase(Sheet5.Range("K2") & "*") Then
Cell.Interior.ColorIndex = 6
ElseIf UCase(Cell.Value) Like UCase(Sheet5.Range("K3") & "*") Then
Cell.Resize(, 2).Interior.ColorIndex = 8
ElseIf UCase(ActiveCell.Offset(0, -1).Value) Like UCase(Sheet5.Range("K3") & "*") Then
Cell.Interior.ColorIndex = 8
Else
Cell.Interior.ColorIndex = xlNone
Cell.Font.Bold = False
End If
Next
End Sub