Macro that copies Checked Boxes in excel to a new sheet by clicking a Command Button

Kt999

New Member
Joined
Sep 19, 2014
Messages
2
So basically I have a list of accounts I need to send out to a client. The client will then check the boxes next to the account names that belong to them. Once they are finished checking the boxes, they will hit 'Certify' which could be a command button or a radio button or a check box, whichever is easiest.

By hitting Certify, I want the checked boxes, and their corresponding accounts, to copy into a new sheet.

An other option is that by hitting the 'Certify' button, it pops out a new form that has the checked accounts linked to it.

If anyone could help me with this it would be MUCH appreciated.

Thank you !!!!
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

wist

Board Regular
Joined
Nov 8, 2012
Messages
79
Hi, not sure what's the code for Checked check box so I wrote macro if there is Yes or No filled in column A

Code:
Sub copychecked()
Sheets.Add.Name = "Checked" 'creates sheet where data will be copied
Sheets("Sheet1").Activate 'assuming the source data is in Sheet1 otherwise change the name


b = 1
c = Application.CountA(Range("A:A"))


'checks which rows in column A are marked as Yes and copies them to the new sheet
Do Until b > c
If Cells(b, 1).Value = "Yes" Then
Rows(b).Copy
Sheets("Checked").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
End If
b = b + 1
Loop


Sheets("Checked").Activate
Cells(1, 1).Select


End Sub

hope it helps
 

Watch MrExcel Video

Forum statistics

Threads
1,109,485
Messages
5,529,143
Members
409,851
Latest member
Ingar
Top