Macro for check box

  • Thread starter Thread starter jd64361
  • Start date Start date
J

jd64361

I have the following information:
Column A Column B Column C
Revenue 1000.0 1200.0 1300.0
Expense $500.00 $300.00 $200.00
Margin $500.00 $900.00 $1,100.00

I am adding a check box in the bottom of each column and I need to
created a macro that when I check the box (true) it will copy and
paste as a value the data above the check box.
thanks for your help.

Pantera
 
Just link your checkbox to the cell it floats over, then run your macro based
on whether that cell is true or false.
 
hi
if i understand correctly, this may do as you wish...
Private Sub CheckBox1_Click()
Dim c As Long
Dim r As Range
If CheckBox1.Value = True Then
c = Cells(Rows.Count, "c").End(xlUp).Row
Set r = Range("A2:A" & c) 'adjust to suit
For Each cell In r
cell.Value = cell.Value
Next cell
End If
End Sub

you gave no indications as to what would happen if the checkbox was false.

regards
FSt1
 
Back
Top