#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check Box Macro bjh Excel Discussion (Misc queries) 5 June 24th 08 09:46 PM
Clearing All check boxes using Macro Anil Kumar N. Excel Discussion (Misc queries) 4 December 27th 07 10:40 AM
To be safe - how to check macro before run it? Eric Excel Discussion (Misc queries) 2 April 21st 06 12:31 AM
need macro to check part# and sum jg53 Excel Worksheet Functions 8 April 13th 06 04:29 PM
How do I link a check box to a macro? Tom Excel Worksheet Functions 1 April 12th 05 04:37 AM


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"