Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for check box
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for check box
Just link your checkbox to the cell it floats over, then run your macro based
on whether that cell is true or false. -- Please remember to indicate when the post is answered so others can benefit from it later. " wrote: 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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for check box
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 " wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check Box Macro | Excel Discussion (Misc queries) | |||
Clearing All check boxes using Macro | Excel Discussion (Misc queries) | |||
To be safe - how to check macro before run it? | Excel Discussion (Misc queries) | |||
need macro to check part# and sum | Excel Worksheet Functions | |||
How do I link a check box to a macro? | Excel Worksheet Functions |