Question:
Add checkbox column in Excell spreadsheet for Mac 2011?
JJ
2012-02-27 09:40:40 UTC
I want to add a checkbox column to spreadsheet. Want to check off that the item has been completed. Is there a simple way to do this? Just a simple box with no text that I can "checkoff".
Four answers:
garbo7441
2012-02-27 12:31:40 UTC
Here is a simple way to just add a 'check mark' to any cell in a specified column just by double clicking the cell. This was created in Excel for PC, but Excel 2011 supports macros/event handlers created in Excel.



The following example uses column 'A' (1) as the column to return the check mark in. If your column is not 'A', change the '1' to the number representing your column, i.e. A = 1, Z = 26.



Then, copy the following code, modified if needed, to the clipboard:





Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, _

ByVal Target As Range, Cancel As Boolean)

If Target.Column = 1 Then

ActiveCell.Font.Name = "wingdings 2"

ActiveCell.Font.Size = 12

ActiveCell.Font.Bold = True

ActiveCell.Value = "P"

ActiveCell.HorizontalAlignment = xlCenter

End If

End Sub



Select the sheet you wish to use this in and right click the sheet tab.



Select 'View Code'



Paste the event handler into the white editing area to the right.



Close the VBE and return to the worksheet.



Double click any cell in your specified column and the check mark will be entered.



Note: the accessing of the VBE in Excel 2011 for Mac may be different than indicated above. Not sure, I don't have a Mac.
eherrera
2014-04-23 11:34:19 UTC
garbo7441 Your reply was simple but very good, just that I needed for my spreadsheet. I just did a little change in order to go back the format if the user double click again in the same cell:



Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

Select Case ActiveCell.Value

Case ""

If Target.Column = 6 And Target.Row <> 1 Then

ActiveCell.Font.Name = "wingdings 2"

ActiveCell.Font.Size = 11

ActiveCell.Font.Bold = True

ActiveCell.Value = "P"

ActiveCell.HorizontalAlignment = xlCenter

End If

Case Else

ActiveCell.Font.Name = "Calibri"

ActiveCell.Font.Size = 11

ActiveCell.Font.Bold = False

ActiveCell.Value = ""

ActiveCell.HorizontalAlignment = xlLeft

End Select

End Sub



Just if someone want to do the same.



Regards!
Karen
2016-02-26 05:04:46 UTC
Excel Help is not very good, but if you word it correctly you get the right answer... Switch rows of cells to columns or columns to rows Data from the top row of the copy area appears in the left column of the paste area, and data from the left column appears in the top row. 1. Select the cells that you want to switch. 2. Click Copy . 3. Select the upper-left cell of the paste area. The paste area must be outside the copy area. 4. On the Edit menu, click Paste Special. 5. Select the Transpose check box.
pete l
2012-02-27 09:53:17 UTC
If you do not want it to do anything except show a 'tick' when you click it, go to the Developer tab and under controls click on 'Insert''



In the Form Controls, click on the 'Check Box' item then 'draw' it in the cell (it is always a standard size) you want.



To remove the text 'Check' that comes with it, right click on the 'check box' and use 'Edit Text' to delete it.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...