Sharepoint - Yes\No field to display as a checkbox in the web part view

Just a minor variation on the given answer:

=IF(YesNoColumnName=TRUE
    ,
    "<img src='http://SharePointUrl/_layouts/images/cbChecked_locked.GIF' border='0'/>"
    ,
    "<img src='http://SharePointUrl/_layouts/images/cbUnChecked.GIF' border='0'/>"
   )

The less characters you type, the less mistakes you can make

The checkbox column is a boolean so you do not need to check for =TRUE
Unless you want to reference another SharePoint site you do no need the full URL
border=0 is the default so not required (and obsolete in HTML5)
If only for easy maintenance you can rewrite the Formula to:

="<img src='/_layouts/images/cb"
 & IF(YesNoColumnName,"Checked_locked","UnChecked")
 & ".GIF'/>"

Since the IMG tag is selfclosing and url references without spaces do not need quotes, you could even use:

="<img src=/_layouts/images/cb"
 & IF(YesNoColumnName,"Checked_locked","UnChecked")
 & ".GIF>"

And if the green checkmark instead of the locked/grey one is fine:

="<img src=/_layouts/images/cb"
 & IF(YesNoColumnName,"","un")
 & "checked.gif>"

Sorry.. too much time on my hands today :-)

Update: use Unicode characters instead of IMG

I actually dreamed on how to get that IF statement with the language dependant , or ; parameter separator out of there

If you use an HTML unicode character Ballot Box instead of the image it is the same Formula for every SP language environment

&#9744; =
and
&#9745; =

I added a DIV with some CSS for better formatting:

="<div style='font-size:25px;margin-top:-10px;color:darkgrey;'>"
&"&#974"
& 4 + YesNoColumnName
&";</div>"

Dirty programming, adding a boolean to an integer, but it works since false=0 and true=1


You can always add a calculated column to your list and show an image based if the column is "Yes" or "No" in the list view instead of having the column with the actual text value "Yes" and "No" displaying..

There are existing check box icons in SharePoint 2010 which might suit you.

cbChecked_locked.gif and cbUnChecked.gif

For an example you can use existing images ( or use any of your own ) in a calculated column based on the type number and add this:

=IF(YesNoColumnName=TRUE;"<img src='http://SharePointUrl/_layouts/images/cbChecked_locked.GIF' border='0'/>";"<img src='http://SharePointUrl/_layouts/images/cbUnChecked.GIF' border='0'/>")

This is the result based on what i used in the column "YesNoColumnName". ( Yes, i did it in 2013, but the images exist in 2010. )

enter image description here

Or you can create a calculated column and display any value based on the yes no column.

=IF(YesNoColumnName=TRUE,"This is the text when the column is Yes","This is the text when the column is No")

One additional note is that based on your regional setting in SharePoint, you might need to replace all ";" characters with a "," or vice versa.