<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>UDF Archives - Excel Zoom</title>
	<atom:link href="https://excelzoom.com/tag/udf/feed/" rel="self" type="application/rss+xml" />
	<link>https://excelzoom.com/tag/udf/</link>
	<description>...because it&#039;s more than just a calculator</description>
	<lastBuildDate>Mon, 16 Dec 2013 20:43:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>

<image>
	<url>https://excelzoom.com/wp-content/uploads/2022/04/favicon.ico</url>
	<title>UDF Archives - Excel Zoom</title>
	<link>https://excelzoom.com/tag/udf/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Create a User Defined Function</title>
		<link>https://excelzoom.com/create-a-user-defined-function/</link>
					<comments>https://excelzoom.com/create-a-user-defined-function/#comments</comments>
		
		<dc:creator><![CDATA[Mark]]></dc:creator>
		<pubDate>Tue, 02 Jun 2009 11:35:25 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[UDF]]></category>
		<category><![CDATA[User Defined Function]]></category>
		<category><![CDATA[VBA]]></category>
		<guid isPermaLink="false">http://excelzoom.com/?p=152</guid>

					<description><![CDATA[<p>Excel allows you to create your own &#8220;User Defined Functions&#8221; (UDF) that can be used the same way as any other built-in function in Excel (i.e. IF, SUM, VLOOKUP, etc.).  With a little knowledge of VBA code, you can create your own function to do pretty much whatever you want. To illustrate how to create [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://excelzoom.com/create-a-user-defined-function/">Create a User Defined Function</a> appeared first on <a rel="nofollow" href="https://excelzoom.com">Excel Zoom</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Excel allows you to create your own &#8220;User Defined Functions&#8221; (UDF) that can be used the same way as any other built-in function in Excel (i.e. IF, SUM, VLOOKUP, etc.).  With a little knowledge of VBA code, you can create your own function to do pretty much whatever you want.</p>
<p>To illustrate how to create a UDF, we&#8217;ll create a function that calculates fuel consumption in miles per gallon.</p>
<ul>
<li>First, open a new Excel workbook.</li>
<li>Open VBA (Alt+F11)</li>
<li>Right click the workbook&#8217;s name (i.e. VBAProject (Book1))and select Insert | Module</li>
</ul>
<p><br />
In order to calculate your vehicle&#8217;s fuel consumption in miles per gallon, you&#8217;ll need to know a couple things:</p>
<ul>
<li>How many miles driven (ending miles less beginning miles)</li>
<li>Number of gallons used </li>
<li>Miles per Gallon = (Ending Miles &#8211; Beginning Miles) / Gallons Used</li>
</ul>
<p>Now, from the new module you opened in VBA, begin typing your function as follows.</p>
<p style="padding-left: 30px;"></p>
<p>After entering the UDF in your module, return back to the Excel workbook and test it out. </p>
<p>Take a look at the example below to see how this function works the same way any built in function would work.</p>
<p> </p>
<p><img decoding="async" src="https://excelzoom.com/images/mpg.jpg" alt="User Defined Function" /></p>
<p>You can create your own functions to do just about any calculation you can think of, as well as manipulating text.</p>
<p> These functions can be saved in the workbook you&#8217;re working in, or can be saved as an add-in if you wish to use it in more than one workbook.</p>
<p>To save the workbook as an add-in, simply click File | Save As enter a name for the file, then change the file type to Microsoft Excel Add-In (*.xla).  In Excel 2007, you can then import the add-in by clicking Excel Options after clicking the Office Button, then clicking Add-Ins.  Towards the bottom of the screen, select Manage: Excel Add-Ins and click Go.  In earlier versions of Excel, click Tools | Add-Ins.  On the next screen, click Browse and find the location of your Add-In.  Make sure it is checked in the list, and hit OK.  You should now be able to access your Add-In in any file you&#8217;re using.</p>
<p>The post <a rel="nofollow" href="https://excelzoom.com/create-a-user-defined-function/">Create a User Defined Function</a> appeared first on <a rel="nofollow" href="https://excelzoom.com">Excel Zoom</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://excelzoom.com/create-a-user-defined-function/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
