View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Charles is offline
external usenet poster
 
Posts: 1
Default Is this possible?

Tye,

Not sure what you are saying, but here's a code to look at.

Charles


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim a As Boolean
Dim x As Integer
a = False
For x = 6 To 53
If Cells(x, 3).Value = 0 Then
Range(Cells(x, 13), Cells(x, 32)).Value = "-"
ElseIf Cells(x, 3).Value = 1 And a = False Then
Range(Cells(x, 13), Cells(x, 13)).Value = "1"
Range(Cells(x, 14), Cells(x, 32)).Value = "-"
a = True
ElseIf Cells(x, 3).Value = 1 And a = True Then
Range(Cells(x, 13), Cells(x, 22)).Value = "-"
Range(Cells(x, 23), Cells(x, 23)).Value = "1"
Range(Cells(x, 24), Cells(x, 32)).Value = "-"
a = False
ElseIf Cells(x, 3).Value = 2 Then
Range(Cells(x, 13), Cells(x, 13)).Value = "1"
Range(Cells(x, 14), Cells(x, 22)).Value = "-"
Range(Cells(x, 23), Cells(x, 23)).Value = "1"
Range(Cells(x, 24), Cells(x, 32)).Value = "-"
End If
Next x
End Su

--
Message posted from http://www.ExcelForum.com