hi..
i already know how to change the cell's colors when i click it.. but i need
to increase a number on one specific cell when the color of any cell is red..
can someone help me pls?
hi..
i already know how to change the cell's colors when i click it.. but i need
to increase a number on one specific cell when the color of any cell is red..
can someone help me pls?
Daniel,
Try something like the following:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then
Exit Sub
End If
Application.EnableEvents = False
On Error GoTo ErrH
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing
Then
Target.Interior.ColorIndex = 3
Target.Value = Target.Value + 1
End If
ErrH:
Application.EnableEvents = True
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Daniel" <[email protected]> wrote in message
news:[email protected]...
> hi..
>
> i already know how to change the cell's colors when i click
> it.. but i need
> to increase a number on one specific cell when the color of any
> cell is red..
>
> can someone help me pls?
>
>
nop.. it isnt working
but thanks for the help..
Daniel.
"Chip Pearson" wrote:
> Daniel,
>
> Try something like the following:
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then
> Exit Sub
> End If
>
> Application.EnableEvents = False
> On Error GoTo ErrH
> If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing
> Then
> Target.Interior.ColorIndex = 3
> Target.Value = Target.Value + 1
> End If
>
> ErrH:
> Application.EnableEvents = True
> End Sub
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting, LLC
> www.cpearson.com
>
>
>
>
> "Daniel" <[email protected]> wrote in message
> news:[email protected]...
> > hi..
> >
> > i already know how to change the cell's colors when i click
> > it.. but i need
> > to increase a number on one specific cell when the color of any
> > cell is red..
> >
> > can someone help me pls?
> >
> >
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks