<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>My Scripts and Tips &#187; SharePoint</title>
	<atom:link href="http://www.tipsandscripts.net/archives/category/sharepoint/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tipsandscripts.net</link>
	<description>Various things I've found useful in my travels</description>
	<lastBuildDate>Mon, 09 Aug 2010 09:23:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SharePoint Calculated Column Formula to calculate CIDR</title>
		<link>http://www.tipsandscripts.net/archives/12</link>
		<comments>http://www.tipsandscripts.net/archives/12#comments</comments>
		<pubDate>Thu, 25 Oct 2007 03:57:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.tipsandscripts.net/archives/12</guid>
		<description><![CDATA[This formula takes a column called Mask and calculates the CIDR. It assumes that the subnet mask is valid. Note that if the column is called Subnet Mask this formula won&#8217;t work &#8211; it&#8217;s probably too long. ?View Code TEXT=IF(Mask=&#34;&#34;,&#34;&#34;,IF(Mask=&#34;0.0.0.0&#34;,0,0)+IF(Mask=&#34;128.0.0.0&#34;,1,0)+IF(Mask=&#34;192.0.0.0&#34;,2,0)+IF(Mask=&#34;224.0.0.0&#34;,3,0)+IF(Mask=&#34;240.0.0.0&#34;,4,0)+IF(Mask=&#34;248.0.0.0&#34;,5,0)+IF(Mask=&#34;252.0.0.0&#34;,6,0)+IF(Mask=&#34;254.0.0.0&#34;,7,0)+IF(Mask=&#34;255.0.0.0&#34;,8,0)+IF(Mask=&#34;255.128.0.0&#34;,9,0)+IF(Mask=&#34;255.192.0.0&#34;,10,0)+IF(Mask=&#34;255.224.0.0&#34;,11,0)+IF(Mask=&#34;255.240.0.0&#34;,12,0)+IF(Mask=&#34;255.248.0.0&#34;,13,0)+IF(Mask=&#34;255.252.0.0&#34;,14,0)+IF(Mask=&#34;255.254.0.0&#34;,15,0)+IF(Mask=&#34;255.255.0.0&#34;,16,0)+IF(Mask=&#34;255.255.128.0&#34;,17,0)+IF(Mask=&#34;255.255.192.0&#34;,18,0)+IF(Mask=&#34;255.255.224.0&#34;,19,0)+IF(Mask=&#34;255.255.240.0&#34;,20,0)+IF(Mask=&#34;255.255.248.0&#34;,21,0)+IF(Mask=&#34;255.255.252.0&#34;,22,0)+IF(Mask=&#34;255.255.254.0&#34;,23,0)+IF(Mask=&#34;255.255.255.0&#34;,24,0)+IF(Mask=&#34;255.255.255.128&#34;,25,0)+IF(Mask=&#34;255.255.255.192&#34;,26,0)+IF(Mask=&#34;255.255.255.224&#34;,27,0)+IF(Mask=&#34;255.255.255.240&#34;,28,0)+IF(Mask=&#34;255.255.255.248&#34;,29,0)+IF(Mask=&#34;255.255.255.252&#34;,30,0)+IF(Mask=&#34;255.255.255.254&#34;,31,0)+IF(Mask=&#34;255.255.255.255&#34;,32,0)) Note that if I was to do this again, I would probably just create a [...]]]></description>
			<content:encoded><![CDATA[<p>This formula takes a column called Mask and calculates the CIDR. It assumes that the subnet mask is valid. Note that if the column is called Subnet Mask this formula won&#8217;t work &#8211; it&#8217;s probably too long.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p12code2'); return false;">View Code</a> TEXT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p122"><td class="code" id="p12code2"><pre class="text" style="font-family:monospace;">=IF(Mask=&quot;&quot;,&quot;&quot;,IF(Mask=&quot;0.0.0.0&quot;,0,0)+IF(Mask=&quot;128.0.0.0&quot;,1,0)+IF(Mask=&quot;192.0.0.0&quot;,2,0)+IF(Mask=&quot;224.0.0.0&quot;,3,0)+IF(Mask=&quot;240.0.0.0&quot;,4,0)+IF(Mask=&quot;248.0.0.0&quot;,5,0)+IF(Mask=&quot;252.0.0.0&quot;,6,0)+IF(Mask=&quot;254.0.0.0&quot;,7,0)+IF(Mask=&quot;255.0.0.0&quot;,8,0)+IF(Mask=&quot;255.128.0.0&quot;,9,0)+IF(Mask=&quot;255.192.0.0&quot;,10,0)+IF(Mask=&quot;255.224.0.0&quot;,11,0)+IF(Mask=&quot;255.240.0.0&quot;,12,0)+IF(Mask=&quot;255.248.0.0&quot;,13,0)+IF(Mask=&quot;255.252.0.0&quot;,14,0)+IF(Mask=&quot;255.254.0.0&quot;,15,0)+IF(Mask=&quot;255.255.0.0&quot;,16,0)+IF(Mask=&quot;255.255.128.0&quot;,17,0)+IF(Mask=&quot;255.255.192.0&quot;,18,0)+IF(Mask=&quot;255.255.224.0&quot;,19,0)+IF(Mask=&quot;255.255.240.0&quot;,20,0)+IF(Mask=&quot;255.255.248.0&quot;,21,0)+IF(Mask=&quot;255.255.252.0&quot;,22,0)+IF(Mask=&quot;255.255.254.0&quot;,23,0)+IF(Mask=&quot;255.255.255.0&quot;,24,0)+IF(Mask=&quot;255.255.255.128&quot;,25,0)+IF(Mask=&quot;255.255.255.192&quot;,26,0)+IF(Mask=&quot;255.255.255.224&quot;,27,0)+IF(Mask=&quot;255.255.255.240&quot;,28,0)+IF(Mask=&quot;255.255.255.248&quot;,29,0)+IF(Mask=&quot;255.255.255.252&quot;,30,0)+IF(Mask=&quot;255.255.255.254&quot;,31,0)+IF(Mask=&quot;255.255.255.255&quot;,32,0))</pre></td></tr></table></div>

<p>Note that if I was to do this again, I would probably just create a new list with the valid subnets and their CIDR values and then do a lookup on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipsandscripts.net/archives/12/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
