Can a cell be turned on or off?


P

painter50

A1=B1*C1+D1
A2=B2*C2+D2
A3=B3*C3+D3
A4=B4*B4+B4

I would like to be able the have the total in any one of the A cells to add
up only if the cell is click on. In other words, can a cell be turned off or
on as needed?
 
Ad

Advertisements

D

Don Guillett

Right click sheet tab>view code>insert this

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 1 Then Exit Sub
'B1*C1+D1
tr = Target.Row
Target.Value = Cells(tr, 2) * _
(Cells(tr, 3) + Cells(tr, 4))
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top