<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6120009590403615075</atom:id><lastBuildDate>Mon, 02 Sep 2024 07:47:41 +0000</lastBuildDate><category>Excel Functions</category><category>VBA</category><category>Excel Tricks</category><category>Add-ins</category><category>Date and Time</category><category>Text formula</category><category>Data Handling</category><category>Lookups</category><category>Shortcuts</category><category>Advertise</category><category>Conditional Formatting</category><category>Contact US</category><category>Excel Basics</category><category>Links</category><category>MS Excel E-books</category><category>Printing</category><category>Submit Tips</category><category>Use IF and AND</category><title>Microsoft Excel and VBA help</title><description>MS Excel tips, MS Excel help, MS Excel tutorial, VBA Code and Macro</description><link>http://findsarfaraz.blogspot.com/</link><managingEditor>noreply@blogger.com (Sarfaraz Ahmed)</managingEditor><generator>Blogger</generator><openSearch:totalResults>77</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><xhtml:meta content="noindex" name="robots" xmlns:xhtml="http://www.w3.org/1999/xhtml"/><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-7188721193652976593</guid><pubDate>Tue, 18 Aug 2009 18:57:00 +0000</pubDate><atom:updated>2009-08-19T00:28:30.696+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Add-ins</category><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA code, extract Number from Text</title><description>&lt;p&gt;During this post I will try to share VBA/Macro code to extract number from the text. Also, we will discuss the code to help you in understanding how to code in VBA. After all the aim is to make you enable write VBA code. Though in most of my post I write this at the end. This time I am advising you in middle to subscribe yourself to this blog. Also, your comments motivates us. &lt;/p&gt;  &lt;p&gt;Let's move ahead with first understanding the application/scenario under which you can use this code. Take an example where you Microsoft Excel file where you have series of number where text is between number and you are only interested in numbers and not next. If the text is on fixed place you can remove that using &lt;strong&gt;LEFT()&lt;/strong&gt; , &lt;strong&gt;RIGHT()&lt;/strong&gt; or &lt;strong&gt;MIDDLE()&lt;/strong&gt; function. But if the numbers and text are placed in cell where you are not sure number of text character and position of text. VBA code is solution to extract number.&lt;/p&gt;&lt;span class="fullpost"&gt;  &lt;h1&gt;&lt;font size="2"&gt;VBA code to extract Number from Text&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Function ExtractNumber(Target As Range) As Variant      &lt;br /&gt;Dim i As Integer       &lt;br /&gt;Dim str1 As String       &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;For i = 1 To Len(Target)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; If IsNumeric(Mid(Target, i, 1)) Then       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; str1 = str1 + Mid(Target, i, 1)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End If       &lt;br /&gt;Next i&lt;/font&gt;&lt;font color="#0000ff"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;ExtractNumber = str1      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Function&lt;/font&gt;&lt;/p&gt;  &lt;h3&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Logic&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;For loop scan through the entire text like if you pass on the text Ae98rc243cd it will loop to entire text with one character at a time. LEN(Target) provide length to For Loop. Mid(Target,i, 1) picks one character at a time. Isnumeric(Mid(Target,i,1) checks if the character is numeric or not, if it's numeric then it concatenate/join the numbers into str1 using code str1 = str1+Mid(Target, i, 1).&lt;/p&gt;  &lt;p&gt;I am sure this is not very difficult to understand. If you still face any issue, feel free to contact via email. I will try to reply all emails via email or via post.&amp;#160; &lt;/p&gt;  &lt;p&gt;Take a look at image below which will guide you how to use this function on MS Excel worksheet.&lt;/p&gt;  &lt;p&gt;&lt;a title="Microsoft Excel and VBA help" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghvBlhveIarsLUPYiJzgV2k2E3USyzmsIiVM1eF169XKMbokHb961pySvOAQsZUO9ItOZTYo9ojcwIMbDGl4qzfG_a91_cTkEbFronnojvWMyemYDcAJ2iGRumo2C4OOswp9b8PMsF6B0/" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="120" alt="Microsoft Excel and VBA help" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwQ7NseEcUss_cQWn8sefcjEdnrnVybDqSap3qb-b1cGmdjJ1paPhK-xSpLlml8vlsowBOB41AIfIUZ_2hdGy89uNNB4IeeUUedTOBSwRNTcAMDHUKlQCdkNKH_gr2WbLLMgVg9zIr2Fw/" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The above code can be copied to module to use it. However, you are facing an issue with copying VBA code. Please download the file and to view code press &lt;strong&gt;Alt + F11 key&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel and VBA help" href="http://sites.google.com/site/findsarfaraz/Home/ExtractNumber.xls?attredirects=0" target="_blank"&gt;Click here to download Extract Number example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now, to use this code/VBA function in all Microsoft Excel file. You can download Add-ins which has this function embedded. There is another post on this blog to help you with installing Add-ins.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel and VBA, Add-in" href="http://sites.google.com/site/findsarfaraz/Home/ExtractNumber.xla?attredirects=0" target="_blank"&gt;Click here to download Add-in&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I would love to listen to you. Please write your comment below. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;Subscribe here, its free.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/08/vba-code-extract-number-from-text.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwQ7NseEcUss_cQWn8sefcjEdnrnVybDqSap3qb-b1cGmdjJ1paPhK-xSpLlml8vlsowBOB41AIfIUZ_2hdGy89uNNB4IeeUUedTOBSwRNTcAMDHUKlQCdkNKH_gr2WbLLMgVg9zIr2Fw/s72-c" width="72"/><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-4835179965255709224</guid><pubDate>Thu, 06 Aug 2009 20:16:00 +0000</pubDate><atom:updated>2009-08-07T01:46:31.882+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Add-ins</category><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA function to Concatenate</title><description>&lt;p&gt;In this post, let's take a look at VBA code/function to concatenate string. Like in &lt;strong&gt;Microsoft Excel concatenate&lt;/strong&gt; function you cant provide function with range. So you have to provide function with each cell at a time which is time consuming.&amp;#160; The best solution to help&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#000000"&gt;VBA Code&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Function VBAConcatenate(target As Range, delimiter As String) As String      &lt;br /&gt;Dim str As String &lt;/font&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;For Each c In target        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; str = str + delimiter + c         &lt;br /&gt;Next c &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;If delimiter = &amp;quot;&amp;quot; Then        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; VBAConcatenate = str         &lt;br /&gt;Else         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; VBAConcatenate = Right(str, Len(str) - 1)         &lt;br /&gt;End If &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;End Function&lt;/font&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;VBAConcatenate &lt;/strong&gt;require following parameters &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Target: &lt;/strong&gt;Target is range of cell you wish to concatenate.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Delimiter: &lt;/strong&gt;Delimiter is any separator you want to use between concatenated text.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; You have A, B, C and D in range C6:C9 and you want the results as ABCD than you will use VBAConcate in following manner.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt; =VBAConcatenate(C6:C9,&amp;quot;&amp;quot;)&amp;#160; will return ABC&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, VBA concatenate" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP6Sxv4AQXN6PvxRc0kfGJgXAAAdZHNCGCAWQVJnKfQYrRQKTC5VShuEdhUsJJF2QHm7UaIzZMHV-6j-ev8pbOZo_1DZ3YYSZlo8vMDkJVmcZ_B1KalXDZI7z-wNbaNcjjduRD3eNmB3k/" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="104" alt="Microsoft Excel, VBA concatenate" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXPFM0Z3S6SLoiBdrq9aBy6KHhVbJ_k6TbSB8WMKUWBcyutfYiHqIYBd3si46UF58QTK5HuA26lvwalfNQ8xAyGbsVgr67NCILepaGUvJk-TVQphEYqUdlWKX09xwmIaZLtxLrT7JA4LU/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt; You have A, B, C , D and E in range A6:E6 and you want the results as A|B|C|D|E&amp;#160; than you will use VBAConcate in following manner.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt; =VBAConcatenate(A6:E6,&amp;quot;|&amp;quot; )&amp;#160; will return A|B|C|D|E &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, VBA Concatenate" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGm0TIFWDMg6_80Mx-CppCjme0zVB6PSpp8OmAw_h1a4QkZ_HimBgiALCXf0qEIcaZfi94Qjuq4X_eEt6ow88wlhUezU_odCA_lsk-kG1BFi9FSwZ8KPJL4e_9CPYpq3AaB2sRgz1hKrI/" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="122" alt="Microsoft Excel, VBA Concatenate" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT13n7UpkJBegn6G4L2dKyB-o7QWOyEg73rNomdyycrqGVnyACbdnIdGCFj_l-2YVIiCcUAXmc3h07aljPmCjBE-NXExaq3X4kBM0e_3dBZnayCVp5OjvQWZLo5u31LtcLOxTT9ANTvDs/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;Note this is very useful when you want to type a SQL query. In a query you need field name separated by comma. I use this function to get me list of field names in query. &lt;/p&gt;    &lt;p&gt;You can also download the Microsoft Excel file with VBAconcatenate examples here. Just click on link below, to view code press &lt;strong&gt;Alt + F11&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, VBA concatenate" href="http://sites.google.com/site/findsarfaraz/Home/vbacon.xls?attredirects=0" target="_blank"&gt;Click here to Download&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;The only issue with user define functions like VBAConcatenate is they remain limited to that MS Excel workbook where they are written. To use then in all workbooks on your system, you will have to convert this function into add-ins. So, once you install them on your computer you can use VBAConcatenate than in any workbook. You can download VBAConcatenate add-in here.&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, Concatenate VBA addin" href="http://sites.google.com/site/findsarfaraz/Home/vbaconaddin.xla?attredirects=0" target="_blank"&gt;&lt;strong&gt;Click here to download Add-ins&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;If you need help with installing add-ins, please visit my earlier post &lt;a href="http://findsarfaraz.blogspot.com/2009/01/install-add-ins.html"&gt;&lt;strong&gt;How to install Add-ins.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Thanks for spending time in reading post. Request you to leave your comments. Also, you can receive updates, add-ins and e-books, &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;its free&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/08/vba-function-to-concatenate.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXPFM0Z3S6SLoiBdrq9aBy6KHhVbJ_k6TbSB8WMKUWBcyutfYiHqIYBd3si46UF58QTK5HuA26lvwalfNQ8xAyGbsVgr67NCILepaGUvJk-TVQphEYqUdlWKX09xwmIaZLtxLrT7JA4LU/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-8695296812462945277</guid><pubDate>Tue, 04 Aug 2009 07:05:00 +0000</pubDate><atom:updated>2009-08-04T12:35:56.596+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Add-ins</category><title>Book Mark Add-in</title><description>&lt;p&gt;Huge reports with more than 5 sheets are very difficult to browse. Also, in spite of making very professional report you will it confusing. So, solution to avoid confusion is to add book mark sheet with link to each Microsoft Excel worksheet. This worked in my case with large number of reports. But the process is very hectic. Like adding a shape, adding text to shape and than linking it to right worksheets which no one would like to do for each reports you make. Hence, I developed an MS Excel add-in which will automatically does these all for you. Take a look at the video below how it works.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How to use Bookmark Add-ins&lt;/strong&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:21bf2ed0-c603-430f-8f7e-a44840bde9c5" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;div&gt;&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/-DPVTr4bHI0&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/-DPVTr4bHI0&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;This add-ins cost only 5$. If you like to receive this add-in click on button below to pay via Paypal. We will send you add-ins via email. Instructions to installation are available on my other post &lt;b&gt;&lt;a href="http://findsarfaraz.blogspot.com/2009/01/install-add-ins.html"&gt;How to install add-ins&lt;/a&gt;.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post"&gt;&lt;input type="hidden" name="cmd" /&gt; &lt;input type="hidden" name="business" /&gt; &lt;input type="hidden" name="lc" /&gt; &lt;input type="hidden" name="item_name" /&gt; &lt;input type="hidden" name="item_number" /&gt; &lt;input type="hidden" name="amount" /&gt; &lt;input type="hidden" name="currency_code" /&gt; &lt;input type="hidden" name="button_subtype" /&gt; &lt;input type="hidden" name="bn" /&gt; &lt;input type="image" alt="PayPal - The safer, easier way to pay online!" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" /&gt; &lt;img height="1" alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" border="0" /&gt; &lt;/form&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;If you want we will customize this add-ins to add your company name on Bookmark sheet, colors and font as per your need and customization will take only additional 5$.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note: This add-ins is tested to work with MS Office 2003/2007. In case if you face any issue you can contact us and we will provide you support via email/chat.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Please suggest us your comments and feedback. Also, you can subscribe my blog.&lt;b&gt; &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;It&amp;#8217;s free.&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/08/book-mark-add-in.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-1719706854619274321</guid><pubDate>Wed, 29 Jul 2009 17:43:00 +0000</pubDate><atom:updated>2009-07-29T23:13:42.960+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA Code to delete worksheets</title><description>&lt;p&gt;In my last post we have seen how to add worksheets to &lt;strong&gt;Microsoft Excel&lt;/strong&gt; workbook using VBA code. In this post we will delete the worksheet. Now, you have to be very careful while deleting worksheet because you won&amp;#8217;t be able to recover any worksheet that deleted by using this VBA/Macro code. I have written two different set of codes. First one will delete active sheet while other one will delete based on sheet name provided by end user. I have purposely kept the prompt so that you don&amp;#8217;t end up loosing any data while testing code.&lt;/p&gt;  &lt;p&gt;So, let&amp;#8217;s move ahead with first set of VBA/Macro code.&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub DeleteActiveSheet()&lt;/font&gt;&lt;/p&gt;&lt;span class="fullpost"&gt;  &lt;p&gt;&lt;font color="#008000"&gt;' deletes active worksheet in the active workbook&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;On Error Resume Next&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Dim str As String&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;str = ActiveSheet.Name&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sheets(str).Delete&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Warning: The above will permanently delete active worksheet. Kindly be careful.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Mentioned below is a second set of VBA/Macro code. &lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub DeleteSheet()&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#008000"&gt;' deletes a sheet name entered by user in the active workbook&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;On Error Resume Next&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Dim str As String&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;str = InputBox(&amp;quot;Enter the worksheet name&amp;quot;, &amp;quot;Findsarfaraz&amp;quot;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sheets (str).Delete&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Warning: The above will permanently delete the worksheet name provide by you. Kindly be careful.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I would suggest you to take a look at code in MS Excel file. &lt;strong&gt;&lt;a title="Microsoft Excel, Delete worksheet VBA" href="http://sites.google.com/site/findsarfaraz/Home/deleteworksheet.xls?attredirects=0" target="_blank"&gt;Click here to download&lt;/a&gt;&lt;/strong&gt;. To view code, press &lt;strong&gt;Alt + F11 keys. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you like to read more such articles, please subscribe to my blog. &lt;a title="Microsoft Excel, Subscribe free tutorial" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;&lt;strong&gt;Click here to subscribe, its free&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;. &lt;/strong&gt;Also, your comments motivates me. Please comment.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/vba-code-to-delete-worksheets.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-3975529071967204785</guid><pubDate>Tue, 28 Jul 2009 13:28:00 +0000</pubDate><atom:updated>2009-07-29T05:37:50.047+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA code to Add worksheet</title><description>&lt;div class="Section1"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style=" ;font-family:arial;font-size:10pt;"&gt;Today we will discuss a different method in VBA to add worksheet in &lt;strong&gt;MS Excel&lt;/strong&gt; workbook. Now when I say different method I mean ways of adding worksheet based on your requirement. Let’s moved ahead and start with simple piece of code to complex one in steps and based on scenario.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;Scenario 1:  Add worksheet with default name. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;Sub Addsheet()&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;Worksheets.Add&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span class="fullpost"&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style=" ;font-family:arial;font-size:10pt;"&gt;&lt;strong&gt;Note: The above code will add a worksheet before active worksheet.&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;Scenario 2:  Add worksheet with specific name. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;Sub Addsheet()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;       Worksheets.Add().Name = "Sarfaraz"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;Scenario 3:  Add multiple worksheets.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;Sub Addsheet3()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;'Add Multiple worksheets&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;    Worksheets.Add After:=Worksheets(Worksheets.Count), Count:=4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="  ;font-family:arial;font-size:10pt;color:blue;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;Scenario 4:  Add worksheets at end.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;  font-family:arial;font-size:10pt;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Times New Roman;font-size:100%;color:#0000ff;"&gt;&lt;span style=" ;font-size:12pt;color:blue;"&gt;Sub Addsheet4()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;color:#0000ff;"&gt;&lt;span style=" ;font-size:12pt;color:blue;"&gt;'Add worksheets at the end&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;color:#0000ff;"&gt;&lt;span style=" ;font-size:12pt;color:blue;"&gt;    Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = "Sarfaraz"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;color:#0000ff;"&gt;&lt;span style=" ;font-size:12pt;color:blue;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#333333;"&gt;&lt;span style="  ;font-family:verdana;font-size:11pt;color:#333333;"&gt;If you have any issue with replicating this code in &lt;strong&gt;MS Excel&lt;/strong&gt; than download the Microsoft Excel file which I have uploaded. To view the code press &lt;strong&gt;Alt + F11 key&lt;/strong&gt; on keyboard. To run the code I have place four buttons. Each button has one scenario.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#333333;"&gt;&lt;span style="  ;font-family:verdana;font-size:11pt;color:#333333;"&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Add Sheet example" href="http://sites.google.com/site/findsarfaraz/Home/AddSheet.xls?attredirects=0" target="_blank"&gt;Download Add Sheet example&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;      &lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#333333;"&gt;&lt;span style="  ;font-family:verdana;font-size:11pt;color:#333333;"&gt;For Free Microsoft Excel and VBA help  &lt;strong&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;subscribe to blog via email&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/strong&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p&gt;&lt;strong&gt;&lt;b&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#333333;"&gt;&lt;span style="  ;font-family:verdana;font-size:11pt;color:#333333;"&gt;We assure you knowledge, not SPAM!&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/div&gt;</description><link>http://findsarfaraz.blogspot.com/2009/07/vba-code-to-add-worksheet.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-8572437126494242095</guid><pubDate>Mon, 27 Jul 2009 04:23:00 +0000</pubDate><atom:updated>2009-07-27T09:53:38.273+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Tricks</category><title>Sequence formula</title><description>&lt;p&gt;Many a times you must want MS Excel to sequence the entry automatically. But thats not one of the features of MS Excel. So what you do is you enter the list than you type 1 in the top most row and drag it till last row. isn't it? This is most common practice I have seen around. Today here I will share to tricks on sequence.&lt;/p&gt;  &lt;p&gt;In first sequence type, we will count the based on number of rows filled without checking if the value is duplicate with respect to previous row. &lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Formula: =IF(B6=&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,COUNTA($B$6:B6))&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;In the above example, we are considering that we are sequencing based on column B starting from 6th row. The formula check if the value is present in B column and then counta find the count of non-blank from column B6 to respective row and returns count. Like, if you are on row 12 then formula will be&amp;#160; =IF(&lt;strong&gt;B12&lt;/strong&gt;=&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,COUNTA($B$6:&lt;strong&gt;B12&lt;/strong&gt;)).&amp;#160; Lets take a look at illustration in image below.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Sequence" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZkLkEIPmbw0B3DOq6igmcd54eHb3eUgukHnbbK8i5dca4T3Si9mOSgpP-mPvjWqJmGWsNF9SI7wgCWk7gJWIIS7DbXZX-GJg1kOlOQYUMakNREtnmje3U69sRsDACkjt0bzOB4vMOpMI/" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="157" alt="Microsoft Excel, Sequence Generator" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZhpHxULZJgfBk13aOLabIrFMytRaT1U-38EjmqqmeQzWqdIAnaf0TQxyCRRzvW1ldjvXhXnreKPlECELOsvV-E240HO4wA8tr1wnWoUhfq6kO_WQZRg8fvtAqsYH6Qj2Wv7OCkT7P9SE/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;In second type, the increment happens only if the text entered is different from the one in the previous cell. Like if John is entered in B2 and B3 then both will have sequence number 1. Remember the same number will be assigned only if the both entered text are in adjacent cells like B2 and B3. Also, if you are using this for data entry purpose than to fix the sequence you can sort on the column.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, Sequence generator" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOKIPRxBk7XNsU6m3uqY-pUBfcic7HVkm6keNefmu5ZGPT5abXoRnD87XekyYn2fsH1Rr1pmZYfPhW4_SnOK_ptCAC0RzVz4Ypf1g69KL7EqmWM3Umq3qhzLwEJIejEirqCJ1XMVBWDj4/" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="168" alt="Microsoft Excel, Sequence generator" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ63NctcMBti1l1KPQ-tr5tKQMHYbUk-BOi3z65aak0XKg8ovBXUed7d0TOQccDvw_yDKRniHkX_vxfdcq3sf1ibsQaACwhsBCaEWFahl6q8u8ErSoqJ3uOwOLTMEKW7n0zsPFVfFzJ2s/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Formula: =IF(B5=&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,IF(B5=B4,A4,A4+1))&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;First IF checks whether the cells has any value. If the cells is empty then it leaves sequence cell empty(in above example A column has sequence numbers) empty. Else, it checks if the current cells values is same as cell in previous row. if yes, then it returns sequence of previous cell otherwise it adds 1 to sequence of previous row and return new number in sequence. You can concatenate/combine this sequence number with any text to get unique keys like in invoices/bill or memo.&lt;/p&gt;    &lt;p&gt;I would suggest you to download the file I have enclosed with post. That will give you more clear picture. Also, I would suggest you to use this trick in one of your MS Excel report or template. So, you can remember entire logic.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel Sequence Example" href="http://sites.google.com/site/findsarfaraz/Home/Sequence.xls?attredirects=0" target="_blank"&gt;Sequence example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Thank you for spending your valuable time in reading above post and if you like to read more such tricks &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;subscribe to blog via email&lt;/a&gt;&lt;/strong&gt;. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/sequence-formula.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZhpHxULZJgfBk13aOLabIrFMytRaT1U-38EjmqqmeQzWqdIAnaf0TQxyCRRzvW1ldjvXhXnreKPlECELOsvV-E240HO4wA8tr1wnWoUhfq6kO_WQZRg8fvtAqsYH6Qj2Wv7OCkT7P9SE/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-2637440709503553904</guid><pubDate>Thu, 23 Jul 2009 18:41:00 +0000</pubDate><atom:updated>2009-07-24T00:12:12.145+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>Trunc function to remove decimal</title><description>&lt;p&gt;This function remove the decimal part of number. I find this function useful only when decimal precision is not important. Like you only want to consider 2 decimal places and want to completely ignore the numbers beyond 2 decimal places or so. The most important thing about Trunc function is it does not round off, it completely removes decimal.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Syntax: Trunc(Number, Precision)&lt;/strong&gt;&lt;/p&gt;&lt;span class="fullpost"&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;We will take few number for example to explain you how Trunc functions works. Like in all other post, I have enclosed image with example. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Trunc Example" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL6R4NIWIMUIv0jA_C78vr8__JIzkFs5itnx2t7j0nS-uzS2a2efapR6-EOCo2qW_th0ZTbEu7SzQyACgGytkqHnGZJz9-0Z5dxUlBVoOlMBCIQEiuFNVL-4asSuj8PyB4yvKxinV-6lw/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="88" alt="Microsoft Excel, trunc" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitJ6ajcTmQAzx1r_jzLn3t7tD5gKzlvcQ55BQeIgjigDT3lPlDlQaaLzBQZ7muJ_9H2ZM1Kx6IO0icAfhBDJSQB6GoH8V7WHje78NDBME8_hZYe1qR6jPhT6DvJEaKiKVil7u7kuwo17Y/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Also, if you face issue with replicating this example on MS Excel than download the MS Excel file with example.&amp;#160; I am sure you will use this function in your day to work life.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Trunc Example" href="http://sites.google.com/site/findsarfaraz/Home/Trunc.xls?attredirects=0"&gt;Download Example of Trunc&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Thank you for spending your valuable time in reading above post and if you like to read more such tricks &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;subscribe to blog via email&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/trunc-function-to-remove-decimal.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitJ6ajcTmQAzx1r_jzLn3t7tD5gKzlvcQ55BQeIgjigDT3lPlDlQaaLzBQZ7muJ_9H2ZM1Kx6IO0icAfhBDJSQB6GoH8V7WHje78NDBME8_hZYe1qR6jPhT6DvJEaKiKVil7u7kuwo17Y/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-1907988482703203908</guid><pubDate>Wed, 22 Jul 2009 06:37:00 +0000</pubDate><atom:updated>2009-07-22T12:07:02.203+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>Upper function to change case</title><description>&lt;p&gt;This post is for beginners of MS Excel. This function convert all the characters to upper case(capitals). It is very useful when you have a data which is not in uniform case.&amp;#160; Like data received from Data entry operators.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Syntax: =Upper(Text)&lt;/strong&gt;&lt;/p&gt;&lt;span class="fullpost"&gt;  &lt;p&gt;Attached below is snapshot with Upper function as example. Take a look, I am sure this will help you.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Microsoft Excel, Upper Function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7PlkwbR_3nsPPGa1ovIt2suEK_c9KJhE61KHV5YZkp2R2McAO-dTrVt68nhDhPzheweBs57FZEEi9ZFpV28dhx__aDK4_OiZaQjmOmcyJR4HPWWNHzMQnRj4jgQ5wryCr6nOmoggXhKQ/" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="133" alt="Microsoft Excel, Upper Function" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimMW37guW96Yi4XaQIjV0cG_neAOQT0pFl_tb7-Cxa0Jbl5l-ykcWRgNKXwmCfrTBPguUbaYYOk8Tb7_9jYMdxU0eYe6982BU02QZe3oDN1Ddcurqp_yufkDpt3xCrDMtkH6kk7_mSfaM/" width="226" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There are other function in MS Excel which help you with cases are Lower(), Proper(). Also, the Upper function is very useful when you want to compare text from two cells. Since Exact() function is case sensitive it treats 'a' and 'A' as two different letters. I have enclosed the link to my earlier post where I have demonstrated to find cases using exact function&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Exact function" href="http://findsarfaraz.blogspot.com/2008/09/check-which-case-is-used.html" target="_blank"&gt;Check which CASE is used using Exact function&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Thank you for spending your valuable time in reading above post and if you like to read more such tricks &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;subscribe to blog via email&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/upper-function-to-change-case.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimMW37guW96Yi4XaQIjV0cG_neAOQT0pFl_tb7-Cxa0Jbl5l-ykcWRgNKXwmCfrTBPguUbaYYOk8Tb7_9jYMdxU0eYe6982BU02QZe3oDN1Ddcurqp_yufkDpt3xCrDMtkH6kk7_mSfaM/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-5604113305462387684</guid><pubDate>Tue, 21 Jul 2009 04:07:00 +0000</pubDate><atom:updated>2009-07-21T09:43:06.158+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>Workday function</title><description>&lt;p&gt;Workday function is used to find either past or future date before/after the given number of business days. The function only consider working/business days which mean while arriving to date it excludes Weekly off's and holidays. What I like most about this function is you can also provide it with holiday list you don;t want to be considered. &lt;/p&gt;  &lt;p&gt;Now if you are thinking what will be the application of this function than let me tell you whenever I decide any dead line for project&amp;#160; I use this function to calculate date. This exclude all Weekends and holidays list which I provide to function. Also, this can be use to calculate delivery date or number of days of work performed.&lt;/p&gt;  &lt;p&gt;Let's take a look at the syntax of formula below. &lt;/p&gt; &lt;span class="fullpost"&gt;  &lt;p&gt;&lt;strong&gt;=Workday(StartDate, Days, Holidays)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;StartDate &lt;/strong&gt;is the beginning date&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Days &lt;/strong&gt;are the number of nonweekend and non-holidays days before or after start date which you want to use for calculating end date. Like for example, if you know that delivery of post takes 5 business days than you will input 5 to &lt;strong&gt;Days &lt;/strong&gt;in formula.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Holidays: &lt;/strong&gt;List of days you want to exclude while calculating end days. Like if you are not working on particular days than you can provide that to formula. This can be provided by using constant arrar {&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;,&amp;quot;C&amp;quot;} or by range of cells. Remember, Saturday and Sunday are default weekends and will be considered as non working days. &lt;/p&gt;  &lt;p&gt;Now lets take look at example of Workday function. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Click on image below view enlarge&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Microsoft Excel, Workday function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixmqkxZChPjao2Evv9bWPyJG5AduQ3JaqjMZmOos-SCjhhSp0pjAhyRMs9Nz1hCf6TOiJYV9WVgemX9L_PXj850cjAGnHYM5sSzaVXpWiaovDvPjYVCErXPqsIy_xDRoBXmTz9RaE57sE/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="151" alt="workday function, microsoft Excel" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFCWCpbsVrnMzshBUw8tvxtrp0lxfWjDS3xKXfDYopg5V77YWy4fwl2AUv1q9e0I6TqeLprYmWdYv9wiFJKci_4kcRh3oUR7l5uXJ3S2dcfYQMt8MquCydqtoaBbckX5Eg_mNqZ4SEif8/" width="195" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To help you in making practical use of this formula I have made an MS Excel file with workday example and one of its application which you can download from link below. I foresee this function to be very useful when for companies who are in courier business. Also, in calculating targets for each employee and understanding time and motion calculation. Please do write to me if you like to discuss this further.&lt;/p&gt;  &lt;p&gt;&lt;a title="Microsoft Excel, workday function" href="http://sites.google.com/site/findsarfaraz/Home/workday.xls?attredirects=0" target="_blank"&gt;&lt;strong&gt;Click here to Download Workday function Example&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Kindly do let us know your suggestion about post. Also, you receive free updates, add-ins, ebooks and useful macro code &lt;strong&gt;&lt;a title="Microsoft Excel, Free tutorial" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;Click Here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/workday-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFCWCpbsVrnMzshBUw8tvxtrp0lxfWjDS3xKXfDYopg5V77YWy4fwl2AUv1q9e0I6TqeLprYmWdYv9wiFJKci_4kcRh3oUR7l5uXJ3S2dcfYQMt8MquCydqtoaBbckX5Eg_mNqZ4SEif8/s72-c" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-6241431409447009</guid><pubDate>Wed, 15 Jul 2009 17:55:00 +0000</pubDate><atom:updated>2009-07-15T23:26:30.228+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Add-ins</category><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA code, count using color</title><description>&lt;p&gt;This is really funny thing in MS Excel I discovered today. Yes, a VBA code to count cells using colors. The intention behind is this post is to share VBA code and help you move ahead with VBA learning. This function is written by me. As you go below you will find formula syntax, vba code and add-ins. So, you can use add-ins on your system without replicating code and you can use this add-in all in open MS Excel file. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Syntax:&amp;#160; =CountColor(TargetRange,CellwithColor)&lt;/strong&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;  &lt;p&gt;&lt;strong&gt;TargetRange:&lt;/strong&gt; Range of cells which you wanted to count under which you want to count cells using criteria as another formatted cell.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CellwithColor:&lt;/strong&gt; Single cell which filled with color which you want to count from TargetRange. &lt;/p&gt;  &lt;p&gt;&lt;font color="#808080"&gt;&lt;strong&gt;Note: &lt;/strong&gt;It wont count cells that are formatted conditionally. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;It may sound complex, but trust its very simple to use. Take a look at screen shot below where I have illustrated using CountColor. &lt;/p&gt;  &lt;p&gt;&lt;a title="Microsoft Excel, count colors" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV0EwA0y5Ixujn3ebEI7qqlg7nVgdl9osmV6v4bfqqPNzmqr7T8yAQ27OxcZ1jOwFSuIey97RR0_uVAp4xCm8QvsdW4X3bs-yMsIpMcplGdvSmS0kO6mtYI3yOSTPNXX03gvg3kHWbEH4/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="139" alt="Microsoft Excel, Count color" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVgILAgdMZirmFiYRP5-HcCxszvzdIQUtutQgkFz3IUOZe7EKHC0aKAWLTYrO_DV3Qp4KKvdrR6C1uZFrb0xrP1wWL7S6FRVPOEKPsVOKP9zbIF8XOK6FsN_flxrKZyRTZACZoBA9m-hc/" width="156" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now, lets take a look a code of function which calculate count based on colors. &lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Public Function CountColor(target As Range, clr As Range) As Integer &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Dim cnt As Integer &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;cnt = 0 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;For Each c In target      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If c.Interior.ColorIndex = clr.Interior.ColorIndex Then       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cnt = cnt + 1       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If       &lt;br /&gt;Next c &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;CountColor = cnt &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Function&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Dim cnt as Integer -&amp;gt; declare the integer variable used to count cells.&lt;/p&gt;  &lt;p&gt;For each c in Target&lt;strong&gt; - &amp;gt;&lt;/strong&gt; each c refers to one cell in target range while looping through for loop. So, if the target range is A1:A10 then while looping its goes A1, A2, A3.... ,A10. &lt;/p&gt;  &lt;p&gt;c.Interior.colorIndex -&amp;gt; Colorindex returns the number for color, Interior of cell refers to color pattern and c is cell from target range. Similarly, clr.Interior.ColorIndex returns the number for color pattern in criteria.&amp;#160; So, if the number returned by &lt;strong&gt;getcolorindex&lt;/strong&gt; method matches with number returned by &lt;strong&gt;getcol&lt;/strong&gt;orindex of criteria it adds 1 to cnt. &lt;/p&gt;  &lt;p&gt;After completing the entire range it pass the value to Countcolor. &lt;/p&gt;  &lt;p&gt;If you still have doubts, download the count color example file. I am sure you would love to use this function.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, count by colors" href="http://sites.google.com/site/findsarfaraz/Home/COUNTCOLORS.xls?attredirects=0" target="_blank"&gt;Download Count color example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Macro are good to use when you want to process or perform operation in one MS Excel file. However, when you want to use any function/vba code independently in all open MS Excel file than add-ins are the best option. Other good thing about add-ins is they don't prompt whether you want to enable or disable code. Hence, I have uploaded the add-ins for you to use and send it across to your friends. Please feel free to download, &lt;strong&gt;its Free.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;#160;&lt;a title="Microsoft Excel, free Add-ins" href="http://sites.google.com/site/findsarfaraz/Home/COUNTCOLORS.xla?attredirects=0" target="_blank"&gt;Download Countcolor Add-ins&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you need help with installing add-ins, please visit our post &lt;strong&gt;&lt;a title="Microsoft Excel, Free add-ins" href="http://findsarfaraz.blogspot.com/2009/01/install-add-ins.html" target="_blank"&gt;How to install Add-ins.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Thanks for spending time in reading post. Request you to leave your comments. Also, you can receive updates, add-ins and e-books, &lt;strong&gt;&lt;a title="Microsoft Excel, Free updates" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;its free&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/vba-code-count-using-color.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVgILAgdMZirmFiYRP5-HcCxszvzdIQUtutQgkFz3IUOZe7EKHC0aKAWLTYrO_DV3Qp4KKvdrR6C1uZFrb0xrP1wWL7S6FRVPOEKPsVOKP9zbIF8XOK6FsN_flxrKZyRTZACZoBA9m-hc/s72-c" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-1233533420824982675</guid><pubDate>Tue, 07 Jul 2009 18:03:00 +0000</pubDate><atom:updated>2009-07-07T23:33:46.240+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>Year Function</title><description>&lt;p&gt;Year function is used to extract year from Date. It&amp;#8217;s very useful when you want to summarize data at year level or you want to apply filter on year. This function in combination with other function is very useful in calculating past/future dates. I will share few examples of Year function in near future. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Formula: =Year(Date)&lt;/b&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, year function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrCw4UsQA1KtKGkgt2eljC8ulPtJkfgWx6cyt0jswV0RAUEZR3gv2n7KWrVGFL3qMBuYqjYopc7qXGYlWgEFE2Ywkzva2aDVEOI52cLn-2Bxp1NtQfdOLMc9QheTSFlGZK4AuZnkZbm4/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="170" alt="Yearfunc" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9d8L83LUFJFf7b6zctaroLjk-prJVw6a7O_jEIm4f2qZUCrHQ2qpwMSwF-NjGGCSjabZ-GTxu0VgAGrYbtslGHDb_EvxKl4Rb-wSlQw8M_l5YysWD640NvxQyi-EsagI_oWKhCJGrXUY/" width="233" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;Example1:&lt;/b&gt; Find the current year.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Formula: Year(Today())&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, Year function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLa_YWnWngL5xXy2-gtVPFlv3tsaFW7zfusTuIcuEhSsiOn3ZI2_ga0o0ZMD1RDQZoyJsDKIixSytKO-bNdJeTtldCMPA0Sdkv4TyFzBRiTsv20SehuVH3fM-2tus-cldsobzCSCGH0sw/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="165" alt="yearfuncexam" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuk6MW-Pk93uWSOUPUJPxBT-Dn0DFphuFRYXptQgPiWk1SbhSGcABu9jwcIkA0LvfKNsRhaASRpmfk3OGFRs8MttrJ5g9qA_H4f8VwvlXGO-hc55cy0ov26uBIePfTqsFUyJEB9eKs5ZQ/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;If you face any issue with replicating this example in MS Excel or understanding this function. I would suggest you to download Year function Excel file enclosed below&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Year function" href="http://sites.google.com/site/findsarfaraz/Home/YearFunction.xls?attredirects=0"&gt;Year Function Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Kindly let me know your view and experiences about using Year function. For free updates &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;subscribe here&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/year-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9d8L83LUFJFf7b6zctaroLjk-prJVw6a7O_jEIm4f2qZUCrHQ2qpwMSwF-NjGGCSjabZ-GTxu0VgAGrYbtslGHDb_EvxKl4Rb-wSlQw8M_l5YysWD640NvxQyi-EsagI_oWKhCJGrXUY/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-2317237205338791531</guid><pubDate>Mon, 06 Jul 2009 18:43:00 +0000</pubDate><atom:updated>2009-07-07T00:13:17.663+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>YearFrac Function</title><description>&lt;p&gt;Yearfrac functions returns the portion of years between dates. The most recommended format of return is percentage. Like if you take Jan 01, 2009 as start and Jun 30, 2009 as end, YearFrac will return 0.49 which is nothing but 49% of year.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;strong&gt;Formula: Year(StartDate, EndDate, Basis)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;StartDate: &lt;/strong&gt;StartDate is date as the name suggest is beginning date which you want to be considered for calculation. Like, if you want to calculate fraction of year starting from day one of year than start date will be 01/01/2009. &lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;EndDate:&lt;/strong&gt; Similar as above will be last date till which you want to find the fraction of year. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Basis: &lt;/strong&gt;There are five options available for choose based on which you will receive the results. Each Type is mentioned below.&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;0: US Calendar style where 30 days per month is considered and hence 360 days in a year. Like 30/360. Also, if nothing is provided in basis than by default if consider as 0. &lt;/li&gt;      &lt;li&gt;1: This will make formula take actual number of days/actual number of days year consist of. &lt;/li&gt;      &lt;li&gt;2: Actual number of days/360. &lt;/li&gt;      &lt;li&gt;3: Actual number of days/365. &lt;/li&gt;      &lt;li&gt;4: Eurpean 30/360 &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;Basis is a most critical parameter which will be be dependant of type of calendar you follow or you want to use for calculation. So, be sure. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; We will try to calculate YearFrac using different basis.&amp;#160; Just to keep the example started I will considered fixed dates 7/6/2009 and 8/6/2009 which has different of 31 days between them.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image to view enlarge.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, YearFrac Example" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7RuF9_yeDxTT6L7i5e_GvPnYLAqqap788tkyGEcyrCvyMhNIuPvAywLc0Ah2fn51C21XLzckGLa-UrvsXknE-ldXYqpShDYDB-lnLMvu6Ax8f3I4SyhJXWXZM1OvzOkVsVLvnwvm0qAo/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="93" alt="yearfrac" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmeerxqUNljrnHwHGz9ZLllK2ewYp_RVceT7kSyzgDBJW4IZ8QRARoq6sTNXa8iYTyqfQzMp1s6h1DY4CrJjmY5A9t7t-rvoBJ8MQovWwJEU40AsT7QsGs8XeKzVXfqmv2YjSmxqVtBEA/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Example 2: &lt;/strong&gt;Task is to calculate leaves on pro-data basis. Like in a year you can have only 21 leaves. So, as the days passes how many leaves will accumulate. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image to view enlarge.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, YearFrac example" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrrD5t_i4irXy7bIya27Zy4OWPd0POnRemPfbu0tXRiMHLNe0rPZwM9f17f93qK5G0zUyIuaWlZydl5yOBfbc6mw-ns6KnbZr1MIhKCy69hWeg1JPg5N6FSL2aTVVGBULQN4muYNn552o/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="166" alt="YearFrac2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYng1S5GbQh52FYtQjs8G_ij8Z9cGUf8ICSIzMUcEu2aAggD4Br8XLpRBSpiFb2FA33ETTqU1MSrAioosESFY61sftaRieqeTubvdgKl57E_ZI88pEEBZjM2ix0ZVhXg7nR-qPySMKeQI/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;in both examples I have formatted Yeafrac as percentage. &lt;/p&gt;    &lt;p&gt;If you still have difficulty in using YearFrac function. I would suggest you to download the file with YearFrac Example. Also, I have added on &lt;strong&gt;bonus example&lt;/strong&gt; in this file. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click Here to download YearFrac&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;If you are first time visitor I would request you to subscribe our blog &lt;strong&gt;&lt;a title="Microsoft Excel," href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;via Email&lt;/a&gt;&lt;/strong&gt;. We will send you free tutorials, e-books, Add-ins and macro code.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/yearfrac-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmeerxqUNljrnHwHGz9ZLllK2ewYp_RVceT7kSyzgDBJW4IZ8QRARoq6sTNXa8iYTyqfQzMp1s6h1DY4CrJjmY5A9t7t-rvoBJ8MQovWwJEU40AsT7QsGs8XeKzVXfqmv2YjSmxqVtBEA/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-4776078335310367278</guid><pubDate>Mon, 06 Jul 2009 17:42:00 +0000</pubDate><atom:updated>2009-07-06T23:12:30.643+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Basics</category><category domain="http://www.blogger.com/atom/ns#">Excel Tricks</category><title>Format Painter</title><description>&lt;p&gt;Format painter is very useful tool when you only wanted to move format of one cell to another or range on worksheet. Using format painter is easiest way to replicate format on the worksheet.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQx7b85LGyh1FH8Fjg-Vn8E4fZbjqOcZFZtcI-sCQQixL0klSe4Xi57DGFbxM5kSaKMB8eg8pkzYlLSiwzNxbfiVgiATy6NOPKH-y3mTNKx0PIhriCfb7GzOy1DLyG_8zDI80jtCLiM1M/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="27" alt="format painter icon" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHtAfF-HytuWFzedKHBaDPPROXl3NGVl-hT0uj3zuU8amva2LeEe4GMf_DCeaO6gyl8S4-eloBgOH5fdnLBwI_jE4wAncJPF07g3HebNPQlxegqnAISdowPXN7sjWBy7Y6llf94C8mWSo/" width="30" border="0" /&gt;&lt;/a&gt;&amp;#160; is a format painter icon which you will find on Standard toolbar. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Follow the steps to use format painter to move format.&lt;/b&gt;&lt;/p&gt;&lt;span class="fullpost"&gt;  &lt;ol&gt;   &lt;li&gt;Select the cell of which you want to copy the format.&lt;/li&gt;    &lt;li&gt;Click on the &lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQx7b85LGyh1FH8Fjg-Vn8E4fZbjqOcZFZtcI-sCQQixL0klSe4Xi57DGFbxM5kSaKMB8eg8pkzYlLSiwzNxbfiVgiATy6NOPKH-y3mTNKx0PIhriCfb7GzOy1DLyG_8zDI80jtCLiM1M/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="27" alt="format painter icon" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHtAfF-HytuWFzedKHBaDPPROXl3NGVl-hT0uj3zuU8amva2LeEe4GMf_DCeaO6gyl8S4-eloBgOH5fdnLBwI_jE4wAncJPF07g3HebNPQlxegqnAISdowPXN7sjWBy7Y6llf94C8mWSo/" width="30" border="0" /&gt;&lt;/a&gt; icon on Standard toolbar.&lt;/li&gt;    &lt;li&gt;The moment you click on Format painter icon, you will see that your cursor has changed to &lt;font size="4"&gt;&lt;strong&gt;+ &lt;/strong&gt;&lt;/font&gt; paintbrush icon.&lt;/li&gt;    &lt;li&gt;Now you can apply the format by clicking on single cell or by dragging it on range of cell. However, if you want to apply the format to disjoint/non contiguous cells than steps will be bit different.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;Follow the steps to use format painter on non-contiguous cells.&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;&lt;/strong&gt;Select the cell of which you want to copy the format.&lt;/li&gt;    &lt;li&gt;Double click on the &lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQx7b85LGyh1FH8Fjg-Vn8E4fZbjqOcZFZtcI-sCQQixL0klSe4Xi57DGFbxM5kSaKMB8eg8pkzYlLSiwzNxbfiVgiATy6NOPKH-y3mTNKx0PIhriCfb7GzOy1DLyG_8zDI80jtCLiM1M/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="27" alt="format painter icon" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHtAfF-HytuWFzedKHBaDPPROXl3NGVl-hT0uj3zuU8amva2LeEe4GMf_DCeaO6gyl8S4-eloBgOH5fdnLBwI_jE4wAncJPF07g3HebNPQlxegqnAISdowPXN7sjWBy7Y6llf94C8mWSo/" width="30" border="0" /&gt;&lt;/a&gt;format painter icon on standard toolbar.&lt;/li&gt;    &lt;li&gt;Now, like earlier the moment you double click the format painter icon you will see your cursor has change to &lt;font size="4"&gt;&lt;strong&gt;+ &lt;/strong&gt;&lt;/font&gt;&lt;font size="2"&gt;paintbrush icon.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Now, click on all the cells of which you want to change the format. Once you are done, press Esc.&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2"&gt;During my first few month's as an MIS I used this method to speed up my work. Format painter very well copy the conditional formatting as well which I liked the most. Remember one thing, more you practice, more you learn. So, keep practicing. I have one more idea of moving format which I will share with in future posts. Do miss any post, &lt;strong&gt;&lt;a title="MS Excel tutorial, help" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;its Free!&lt;/a&gt;&lt;/strong&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/format-painter.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHtAfF-HytuWFzedKHBaDPPROXl3NGVl-hT0uj3zuU8amva2LeEe4GMf_DCeaO6gyl8S4-eloBgOH5fdnLBwI_jE4wAncJPF07g3HebNPQlxegqnAISdowPXN7sjWBy7Y6llf94C8mWSo/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-3600945773998746762</guid><pubDate>Tue, 30 Jun 2009 20:06:00 +0000</pubDate><atom:updated>2009-07-01T01:36:07.513+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><category domain="http://www.blogger.com/atom/ns#">Excel Tricks</category><title>Countif with wildcard criteria</title><description>&lt;p&gt;Here we will learn to use wildcard * in Countif function. Task is find count of all cell which starts with A or any character. There may be many ways which I may not be aware of, here I am posting something I tried and it worked. If you are not comfortable with Countif than this post is not for you. I would suggest you to visit my &lt;strong&gt;&lt;a title="Microsoft Excel, countif help" href="http://findsarfaraz.blogspot.com/2009/03/countif-function.html"&gt;Countif Function&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Syntax for countif function is as follows &lt;/strong&gt;&lt;strong&gt;: Countif(Range, Criteria)&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Example: &lt;/strong&gt;We wanted to find count of names starting with A and Sa from the list of names in A column of sheet. Suppose the names are in A2 to A10 range. &lt;/p&gt;    &lt;p&gt;Formula Countif(A1:A10, &amp;quot;A*&amp;quot;) will return the count of all names starting with A and Countif(A1:A10, &amp;quot;Sa*&amp;quot;) &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image to view enlarge.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel, Countif with Wildcard" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu31F-lXkY6665OmnWE8CUHoeeTB7-2iH1MNz1IAybEK-9Q8LXWjarjxLHD8L2zHWFzjK8wBj8xwk-jFq0RxlnOBJ0XtgHftouMb62GC7QP_NojFd1nugOHOCTReFSfSjnkAI_lpL9oH8/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="Microsoft Excel, countif example" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfwuk7FZK7zFboZFauNpxaSkjXSSm3qsnR7T79utCfIferdQ4dmsZRocJlcZZmM63iIyFvpsdWknmqH6uoxXVCYVFaLEBEHLMECXYUXReZ_430Oydy9ZoqQChu6FsCGAGXi-ATBYIX7Iw/" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Criteria provided in countif is not case sensitive. SA and Sa will be treated as same.&lt;/p&gt;    &lt;p&gt;Also, you can use this function with conditional formatting for give specific color to cell starting specific character. &lt;/p&gt;    &lt;p&gt;You can also download an Countif with wild card example file.&amp;#160; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Countif Example" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu31F-lXkY6665OmnWE8CUHoeeTB7-2iH1MNz1IAybEK-9Q8LXWjarjxLHD8L2zHWFzjK8wBj8xwk-jFq0RxlnOBJ0XtgHftouMb62GC7QP_NojFd1nugOHOCTReFSfSjnkAI_lpL9oH8/"&gt;Click here to download Countif Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;If you are first time visitor, please &lt;strong&gt;&lt;a title="Microsoft Excel, Tutorial" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;subscribe via email&lt;/a&gt;&lt;/strong&gt; to receive updates, add-ins, e-books and lot more.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/07/countif-with-wildcard-criteria.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfwuk7FZK7zFboZFauNpxaSkjXSSm3qsnR7T79utCfIferdQ4dmsZRocJlcZZmM63iIyFvpsdWknmqH6uoxXVCYVFaLEBEHLMECXYUXReZ_430Oydy9ZoqQChu6FsCGAGXi-ATBYIX7Iw/s72-c" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-1004989618057445063</guid><pubDate>Fri, 26 Jun 2009 04:07:00 +0000</pubDate><atom:updated>2009-06-26T09:37:39.690+05:30</atom:updated><title>Add-in and macro to convert seconds to hh:mm:ss</title><description>&lt;p&gt;This add-in and macro will help you in converting seconds to hh:mm:ss. I have put add-ins for those who just wants to use the add-ins and macro for those who wants to understand this trick. This is very useful in BPO/Contact Center where you have source data in seconds and you have to represents data in hh:mm:ss seconds. &lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Mentioned below is macro code&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;Sub convert_hh_mms_ss()        &lt;br /&gt;Dim i As Double         &lt;br /&gt;Dim x As Integer         &lt;br /&gt;Dim y As Long         &lt;br /&gt;x = 1         &lt;br /&gt;y = 1         &lt;br /&gt;For Each c In Selection         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; i = c / 86400         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Selection.Cells(x, y) = i         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Selection.Cells(x, y).NumberFormat = &amp;quot;[h]:mm:ss;@&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; x = x + 1         &lt;br /&gt;Next c         &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#000000"&gt;&lt;strong&gt;Logic: c&lt;/strong&gt; is each cell in selection/range on which you want to perform conversion. &lt;strong&gt;86400&lt;/strong&gt; is nothing but the number of seconds in a day ( 24*60*60). When you divide seconds(&lt;strong&gt;c/86400&lt;/strong&gt;) with &lt;strong&gt;86400&lt;/strong&gt; it returns the numeric value in which MS Excel stores the time. In next steps we convert this numeric value into time format. &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#000000"&gt;If you have difficulty replicating the code in MS Excel. Please download the example file. &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, convert HH:MM:SS Example" href="http://sites.google.com/site/findsarfaraz/Home/convhhmmss.xls?attredirects=0"&gt;Download Macro Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Also, if you can use this macro as Add-in. Dow&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel, Add-ins, Convert HH:MM:SS" href="http://sites.google.com/site/findsarfaraz/Home/convhhmmssaddin.xla?attredirects=0"&gt;Download Add-ins&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;If you need help with installation of Add-ins, please follow our earlier post &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;   &lt;a title="Microsoft Excel, how to install add-ins" href="http://findsarfaraz.blogspot.com/2009/01/install-add-ins.html"&gt;How to install Add-ins&lt;/a&gt;     &lt;p&gt;Please do let me know your comments about this macro and add-ins. Also, you can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;&lt;strong&gt;subscribe via email&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;to receive latest updates, add-ins and e-books in your inbox.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/06/add-in-and-macro-to-convert-seconds-to.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-4365143030514543552</guid><pubDate>Tue, 23 Jun 2009 04:19:00 +0000</pubDate><atom:updated>2009-06-23T09:49:12.671+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Add-ins</category><title>Remove password</title><description>&lt;p&gt;&lt;font face="verdana"&gt;Few days back I wish to remove the password from protected file. So, I started hunting for password removers for MS Excel in Google. I found a unique utility to quickly remove the password which I wanted to share with you all. The reason I am posting this here is there are many such utility available and few of them are paid as well. Also, I have already tested it by putting strong passwords.&lt;/font&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;&lt;a href="http://sites.google.com/site/findsarfaraz/Home/password.zip?attredirects=0" target="_blank"&gt;Download Password remover Add-in&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;This utility is in the form of Add-in. So, click on the link below to follow the installation instruction. &lt;/p&gt;    &lt;p&gt;&lt;a title="How to install Add-ins" href="http://findsarfaraz.blogspot.com/2009/01/install-add-ins.html" target="_blank"&gt;&lt;strong&gt;How to install MS Excel add-ins&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;I would like to convey the special thanks to the developer. Kindly visit them as well&lt;/p&gt;    &lt;p&gt;&lt;a title="http://www.straxx.com/excel/password.html" href="http://www.straxx.com/excel/password.html"&gt;http://www.straxx.com/excel/password.html&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Kindly let us know your comments about your experience about using this add-ins. To receive more such add-ins, e-books and MS Excel updates subscribe to us &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;via email&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Disclaimer: This add-ins is not developed by me, nor I am anyway associated to the develope&lt;/strong&gt;&lt;strong&gt;r. To view developer site &lt;a title="MS Excel password remover" href="http://www.straxx.com/excel/password.html" target="_blank"&gt;click here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/06/remove-password.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-5943974523955551541</guid><pubDate>Sun, 21 Jun 2009 19:53:00 +0000</pubDate><atom:updated>2009-07-04T01:13:15.328+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Add-ins</category><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA to close excel.exe</title><description>&lt;p&gt;Closing all orphan Excel.exe process &lt;/p&gt;  &lt;p&gt;I came across this issue while I was generating reports on SQL server using MS Excel. Here we use to generate reports using MS Excel macro. However this macro's where executed via DTS in SQL. At times if any error occurs, the DTS use to close down leaving excel.exe running as orphan object. This not only sometimes prevent other excel objects but also slow downs your server performance. To tackle this we used the following code to close all MS Excel objects before opening new object. &lt;/p&gt;&lt;span class="fullpost"&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub Close_Excel() &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Dim strClsExl As String      &lt;br /&gt;strClsExl = &amp;quot;TASKKILL /F /IM Excel.exe&amp;quot;       &lt;br /&gt;Shell strClsExl, vbHide &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Sub &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Warning: Kindly save all your work before trying above code as this will close all MS Excel instances running on computer and you will end up loosing your work. &lt;/p&gt;  &lt;p&gt;For your convenience I have linked two files for download along with this post. One has Macro example which you can in understanding code while other is an add-in which will can directly install in your MS Excel. Also, in add-in I have let user to decide which .exe file they want to close. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="MS Excel help" href="http://sites.google.com/site/findsarfaraz/Home/closeexefiles.xls?attredirects=0" target="_blank"&gt;Download Close Excel example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="MS Excel" href="http://sites.google.com/site/findsarfaraz/Home/closeexe-addins.xla?attredirects=0" target="_blank"&gt;Add-ins to close exe&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you need more help with installing add-in on your computer do visit our other post which is mentioned below.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a title="MS Excel, Install addins" href="http://findsarfaraz.blogspot.com/2009/01/install-add-ins.html" target="_blank"&gt;Install Add-ins help&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Kindly leave your comments about this post and receive more such add-ins by &lt;strong&gt;&lt;a title="MS Excel help" href="link=http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;subscribing us&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/06/vba-to-close-excelexe.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-5069614681285449419</guid><pubDate>Mon, 15 Jun 2009 03:22:00 +0000</pubDate><atom:updated>2009-07-04T01:10:13.975+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>Weekday function</title><description>&lt;p&gt;This function is used to find day of week from Date. Also, you can decide which day of week you want to begin the week. Like for different organizations have different week beginning and ending. We will first understand syntax&amp;#160; and than move on two unique use of Weekday function.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Syntax: = Weekday(DateEntered, WeekStart)&lt;/strong&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;WeekStart =1 sets Sunday as start that is 1&amp;#160; and Saturday as end which will7&lt;/p&gt;    &lt;p&gt;WeekStart = 2 sets Monday as start that is 1&amp;#160; and Sunday as end which will be 7&lt;/p&gt;    &lt;p&gt;WeekStart = 3 sets Tuesday as start that is 1 and Monday as end &lt;/p&gt;    &lt;p&gt;If you don't provide any WeekStart then by default MS Excel assume it to 1.&lt;/p&gt;    &lt;p&gt;Take a look at image below with weekday formula.&amp;#160; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="MS Excel, Weekday syntax" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORZQeM5EtSrqpNEgU4LHmHJT6CL7VYjRW7Np97jgZDYf9Aij3_vRaW-yMIYnWdgLV5rfDK2A-07I-2gd5sPCMfBg37QXLfctSXZhOxoPXxFWAVwvv3yqKXUdbU4u7BJiz02oSlJaQAxg/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="110" alt="Weekday function, MS Excel" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZqsTT-4hrxwXUjUxQHXT7Hl_PkMVI6PxLvjC4s-1GR1itsl0qxXMzouEPH-HaYeu8bfleNc2qiX1IblGuLYejwxFyen3SN9SjZ2V38Z3zlbYYWXJDSQqFoe7tBCamBgJq0u_8U2o6c0c/" width="215" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;Example 1: We want to find out day name using weekday function.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Note: The cell format should be choosen as dddd in custom formatting. To choose cell formatting, Press Ctrl + 1 and select custom from category and type dddd.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Example 2: Format entire rows where day is Monday. This is very useful when your week start/end at Monday and you want to mark start or end of week.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;a title="MS Excel, weekday example" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMW4q0aRmwFY2Qv7bbq3kr7b3ViDsRQG1cDFweETBsf17nquIMyL6Fpxuyt1GDBkNXom_1ASz3iMu04svn6NfEFEqkASM8VoFp2WIqeCzzmEqaJ2BDI_6krFep_e40tkiGfAEdb3jED-8/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="109" alt="weekexmple2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLuzrB80y-FKv1TrasyWAsbtf9LL2FvWlvdKhmZT4g74uvuH8drjrSXX9lScjlqt3bn9fOnJGsmcDe82k60-VNhtDYRk2L1K2YwKxS5AQWzEBn-CaZ8w_se7w05ss5q-rozcowA-bbz4/" width="120" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;Here the entire row is formatted based of the value present in A column. If you still have confusion, download the file with Weekend function. &lt;/p&gt;    &lt;p&gt;&lt;a title="MS Excel, weekday function" href="http://num2text.googlepages.com/Weekday.xls" target="_blank"&gt;&lt;strong&gt;Download Weekday function Example&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Also, do let me know your comments about this post and subscribe to us to receive latest updates &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;via email&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/weekday-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZqsTT-4hrxwXUjUxQHXT7Hl_PkMVI6PxLvjC4s-1GR1itsl0qxXMzouEPH-HaYeu8bfleNc2qiX1IblGuLYejwxFyen3SN9SjZ2V38Z3zlbYYWXJDSQqFoe7tBCamBgJq0u_8U2o6c0c/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-356362758415061266</guid><pubDate>Sat, 16 May 2009 04:49:00 +0000</pubDate><atom:updated>2009-07-04T01:03:02.375+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>INT function</title><description>&lt;p&gt;INT rounds of the number to lowest and nearest whole number. INT function does not require any special formatting. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Syntax: &lt;/strong&gt;INT(Number)&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;table cellspacing="0" cellpadding="2" width="369" border="1"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="132"&gt;&lt;strong&gt;Number&lt;/strong&gt;&lt;/td&gt;          &lt;td valign="top" width="121"&gt;&lt;strong&gt;Integer&lt;/strong&gt;&lt;/td&gt;          &lt;td valign="top" width="114"&gt;&lt;strong&gt;Formula&lt;/strong&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="143"&gt;3.5&lt;/td&gt;          &lt;td valign="top" width="128"&gt;3&lt;/td&gt;          &lt;td valign="top" width="119"&gt;=INT(3.5)&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="145"&gt;7.2&lt;/td&gt;          &lt;td valign="top" width="130"&gt;7&lt;/td&gt;          &lt;td valign="top" width="121"&gt;=INT(7.2)&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="145"&gt;15.99&lt;/td&gt;          &lt;td valign="top" width="131"&gt;15&lt;/td&gt;          &lt;td valign="top" width="122"&gt;=INT(15.99)&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="145"&gt;-22.7925&lt;/td&gt;          &lt;td valign="top" width="131"&gt;-23&lt;/td&gt;          &lt;td valign="top" width="122"&gt;=INT(-22.7925)&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;p&gt;&lt;strong&gt;Example: &lt;/strong&gt;A competitive exams require the 18 years of age to appear in exams.&amp;#160; Here is example on finding candidate with age over 18.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel: INT function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkr0H3h0KeWY0AOD10gE1MPHCfjUhBG-6I9fsSXvC20CPIlhPewzjhZp9VzFsxbzvQmWLsvzkWXLJr89Q4JENAQ_accOexumdpecX69tJCqAWqcESneczMoeqx23vrH1iaMwu8S4mkUzc/" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="91" alt="INTFUNCTION" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD0xUYZ3uY6M4gCIRK3IwOUGsX_onlrRIp18LCt6gPki5UTdFhYrHe8H11lXus221o55L063zkU3zUg0Bfm2IjPeEA6FLnslRUXXX1Cm8VhCZVxGv6uSSL_z8uNtA_Dq8k1rVg0J0z3Eg/" width="167" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;I have uploaded the MS Excel file with INT function and INT function example to ensure that we don't miss anything with respect to basic understanding of INT function.&lt;/p&gt;    &lt;p&gt;Also, do let me know your comments about this post and subscribe to us to receive latest updates &lt;strong&gt;&lt;a title="MS Excel help" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;via email&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel: Int function" href="http://num2text.googlepages.com/intfunction.xls" target="_blank"&gt;INT function Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/int-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD0xUYZ3uY6M4gCIRK3IwOUGsX_onlrRIp18LCt6gPki5UTdFhYrHe8H11lXus221o55L063zkU3zUg0Bfm2IjPeEA6FLnslRUXXX1Cm8VhCZVxGv6uSSL_z8uNtA_Dq8k1rVg0J0z3Eg/s72-c" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-3439033207199524807</guid><pubDate>Fri, 15 May 2009 16:41:00 +0000</pubDate><atom:updated>2009-07-04T00:57:28.967+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>Rand and Randbetween function to generate random numbers</title><description>&lt;p&gt;&lt;strong&gt;Rand&lt;/strong&gt; and &lt;strong&gt;Randbetween&lt;/strong&gt; is used to generate random numbers. It is very useful for people like me who post on blog. This help me in generating random data which I use in post on blog. &lt;strong&gt;Randbetween&lt;/strong&gt; is available in MS Excel 2007 while RAND function is available in MS Excel 2007/2003/XP/2000. &lt;strong&gt;Randbetween function&lt;/strong&gt; has an edge over &lt;strong&gt;Rand function &lt;/strong&gt;as it can generate numbers between lower bound and upper bound and gives user a control to over generation of random numbers.&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Rand() Function&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Syntax: &lt;/strong&gt;Rand()&lt;/p&gt;    &lt;p&gt;RAND() function does not require any special formatting. However it returns number in decimal or in others words it returns you number between 0 to 1. Take a look at the image below with example of RAND() function.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image&amp;#160; to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsft Excel: Rand function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg36JxvX8r_438rqNjHjdt_GUjkt1YHyaNOawxRPcSPfR2WQeVaO0sT9OG1ndn7mDFxodBXVVDHHGEtaTT5hK2qnogzsVwTchrRxp5ljaNDNVP6f0gz-CfZpuiADHVGC7xSgcEbkuLhxjI/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="100" alt="rand" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho_kHwqTmOMaDCDF6Uf7_v0NVhVObVpWcCsjPkd6nnEwAtxia-9bE5zY3kkEV9l2Hti4gDXx3X4xtKpUyp2xJAEXFHJVo0PP8hPaBCFDAC8QpwFi9nyqXvq5QNlHOYeEkwyIvnbp_LqIQ/" width="135" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Randbetween() function&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Syntax: &lt;/strong&gt;RANDBETWEEN(LOWER, UPPER)&amp;#160; is syntax for RANDBETWEEN() function in MS Excel 2007. &lt;/p&gt;    &lt;p&gt;Like Rand() function, Randbetween() function does not require any special formatting. Take a look at image below to view example of Randbetween() function.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image&amp;#160; to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel: Randbetween function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm3tcSQfgxAIItVfBQop-D9yt161Qj0al6xmO_QZ82mNIJ8et0E3x9cyVgToVj6DiDBj0puzTivCK_NQjlu4KBpmPuUn4Fu8l4G_ds7kt_XVVeOgEUgcpSk-L-CmgiSeqVWRHxqUTjMhg/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="99" alt="randbetween" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlKT1G1NBh43A9wiWlbwZ8dH4PcV5zz3cLlLyXtXuwk2YWbU1gkxOt2Y3yLHKFiHuZ1DB-ZkHvG_uwKgafICjxA_g_SKK_rV_0W8om5H9KR_RIoZUeaTHiqBSHsYbTWwXwAZbXeEuPwr4/" width="144" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;strong&gt;Example: &lt;/strong&gt;The example exhibits how to use RAND() function to generate numbers between fix range. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image&amp;#160; to view enlarge&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel: RANDBETWEEN Function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4ysy4jpEN6j-7zCHPIu5x5gcAMwla18z7sP3Y9uYCVrRMijnq4a3gVvqYlz_rPYDb8VJDQhyWzPkcSP-NlafqGbVoyO2kz2MQMC1GERxjLsIwYWxx5bD3NMUf6rua1pak8ZgPqokWubc/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="113" alt="rand_example" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzBz6Mo__-QukX8iRRDkRHKncxNWa9gu1658f1K3lBPORJnct3w7GOMlNjR_GwGQxw4lebUGJz4BgJ1IGBQ0g0fPL65OvnYZtn2i_i7XpaXKN7QcITvMhfcAChfyCfHYFsYpQE65qxAWM/" width="147" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;Mentioned below is RAND() function along with INT function and is equivalent to RANDBETWEEN function of Excel 2007.&amp;#160; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt; INT(RAND()*(b-a)+a)&lt;/p&gt;    &lt;p&gt;here a= 100 and b=200&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;=INT(RAND()*(200-100)+100)&lt;/strong&gt; &lt;/p&gt;    &lt;p&gt;(200-100) returns 100 which when multiplied with RAND() return two digit number. Also, here it is treated as upper bound and lower bond. In other words, this function will return numbers between 100 and 200. You can try with different numbers.&lt;/p&gt;    &lt;p&gt;RAND()*(200-100)+100 adds to 3 digit number which is greater than 100 but less than 200. Also, some decimal. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;INT functions&lt;/strong&gt; round off to lowest integral value. &lt;/p&gt;    &lt;p&gt;If you are still in doubt using &lt;strong&gt;RAND()&lt;/strong&gt; and &lt;strong&gt;RANDBETWEEN()&lt;/strong&gt; function. I have kept the file with example for download&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel: Random number Example" href="http://num2text.googlepages.com/RAND.xls" target="_blank"&gt;&lt;strong&gt;Random Number Example download&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;To receive more updates on MS Excel help. You can subsribe &lt;strong&gt;&lt;a title="MS Excel help" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;via email&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/rand-and-randbetween-function-to.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho_kHwqTmOMaDCDF6Uf7_v0NVhVObVpWcCsjPkd6nnEwAtxia-9bE5zY3kkEV9l2Hti4gDXx3X4xtKpUyp2xJAEXFHJVo0PP8hPaBCFDAC8QpwFi9nyqXvq5QNlHOYeEkwyIvnbp_LqIQ/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-4180004711006219119</guid><pubDate>Tue, 12 May 2009 18:54:00 +0000</pubDate><atom:updated>2009-07-04T00:52:40.611+05:30</atom:updated><title>Product function</title><description>&lt;p&gt;This is simple multiplication function. Very useful in almost all worksheet. However, we prefer to use other alternative to multiply numbers. The alternative to Production function is using cell reference in following manner:&amp;#160; A1*B1*C1 which is equivalent to Product(A1,B1,C1)&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;=Product(number1, number2, number3........,number30)&lt;/p&gt;    &lt;p&gt;=Product(Rangeofnumbers)&lt;/p&gt;    &lt;p&gt;=Product(number, Rangeofnumbers)&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Click on image below&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel: Product function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwpD-f7F-5LKpip4FLcOJvUJ_PkHjLwzBU_C3rtpsTxmE2qw8vgQI_QWIWFHQXSs0kVKITSm7UTSqoAnFvfiryg-i8lN6n0NuejbgBtrJPhNEeXtgXrnhs9cDvqB_fbl0jaFS-fG2J2hE/" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="93" alt="Product" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj447wIezQvE73WZw39UH73ReEQyBWeUDuKQ397MmLiOF98BCYZKVhZeJ-kGGkgTqDcq2VRlRxmo8t_UqoIjCwdrpv4mcsN-eXIyjcC4S40kOhcPeCE1d6JpKnrMZx4z00YsrLUPhSbAik/" width="179" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;You can download the file with Product formula example. I am sure this will help you in learning this function. &lt;/p&gt;    &lt;p&gt;&lt;a title="Microsoft Excel: Product Function" href="http://num2text.googlepages.com/Product.xls" target="_blank"&gt;&lt;strong&gt;Download Product Example File&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Please do let me know your comments about my attempt to help beginners with Product function. Also, you can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;&lt;strong&gt;subscribe via email&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/product-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj447wIezQvE73WZw39UH73ReEQyBWeUDuKQ397MmLiOF98BCYZKVhZeJ-kGGkgTqDcq2VRlRxmo8t_UqoIjCwdrpv4mcsN-eXIyjcC4S40kOhcPeCE1d6JpKnrMZx4z00YsrLUPhSbAik/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-2310458277994808092</guid><pubDate>Mon, 11 May 2009 15:57:00 +0000</pubDate><atom:updated>2009-07-04T00:45:08.210+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Shortcuts</category><title>Shortcut key to enter Date and Time in worksheet</title><description>&lt;p&gt;Using &lt;a title="Microsoft Excel: Now function" href="http://findsarfaraz.blogspot.com/2009/05/now-function-for-time.html" target="_blank"&gt;&lt;strong&gt;NOW function&lt;/strong&gt;&lt;/a&gt; refreshes each time when you make entry to worksheet. Hence, I dont prefer to use NOW function. I use shortcut key to enter time or Date to worksheet.&amp;#160; This trick is helpful in saving time.&lt;/p&gt;  &lt;p&gt;For Time&lt;/p&gt; &lt;span class="fullpost"&gt;   &lt;p&gt;&lt;strong&gt;Shortcut key: Ctrl + Shift + ;&lt;/strong&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;    &lt;p&gt;For Date&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Shortcut key: Ctrl + ;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Please do let me know your comments about my attempt to help beginners with Shortcut key to enter date and time. Also, you can &lt;strong&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/shortcut-key-to-enter-date-and-time-in.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-755489001704894920</guid><pubDate>Mon, 11 May 2009 15:36:00 +0000</pubDate><atom:updated>2009-07-04T00:42:41.876+05:30</atom:updated><title>Now function for Time</title><description>&lt;p&gt;&lt;strong&gt;Now&lt;/strong&gt; function is used to enter current date and&amp;#160; time. The &lt;strong&gt;Now&lt;/strong&gt; function keeps on updating time whenever you open workbook or when you make entry to worksheet. This function is useful when you want to use current date and time.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Formula: &lt;/strong&gt;Now()&lt;/p&gt; &lt;span class="fullpost"&gt;&lt;span class="fullpost"&gt;     &lt;p&gt;Now function returns date and time. However the format of cells plays very important role. Click on the image below to take a look of different cells formatted returns date and time in different date and time formats. In simple words, Now functions returns date and time based on cell format.&lt;/p&gt;      &lt;p&gt;&lt;strong&gt;Click on image to view enlarge&lt;/strong&gt;&lt;/p&gt;      &lt;p&gt;&lt;a title="Microsoft Excel help: NOW function" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBfzGJSy7KGfTRJ5aWzQVOsiRqAXvryG0N8c7OdDqR09nBhQrQAvQMMm71zdNGsXXptJBzLiaivLTsk5GdZX3geSVttwASTbAqarmBd6TuEuYBCXa-RFqTRjNedefvMekutBKeK6VhrBc/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="70" alt="nowfunction" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm9TgLiFYAcIMMu2NnQ7LL8bUgj7eYNl672SGYy0B4S0rromjkqnWhigQQ6bDoC935MFDK8nuEER0m8kIR4LHo9f3W-41hyY-GmLJvzQVqgLYwcQAfE3i-okNpAX4B_Px4MAGlyoI49qg/" width="147" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;      &lt;p&gt;For further help, you may download MS Excel file with Now function example. &lt;/p&gt;      &lt;p&gt;&lt;strong&gt;&lt;a title="Microsoft Excel: Now function" href="http://num2text.googlepages.com/Nowfunction.xls" target="_blank"&gt;Now Function Example download&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;      &lt;p&gt;Please do let me know your comments about my attempt to help beginners with Now function. Also, you can &lt;strong&gt;&lt;a title="MS Excel help" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;subscribe via email&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;      &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/now-function-for-time.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm9TgLiFYAcIMMu2NnQ7LL8bUgj7eYNl672SGYy0B4S0rromjkqnWhigQQ6bDoC935MFDK8nuEER0m8kIR4LHo9f3W-41hyY-GmLJvzQVqgLYwcQAfE3i-okNpAX4B_Px4MAGlyoI49qg/s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-4256591989300983116</guid><pubDate>Sat, 02 May 2009 04:20:00 +0000</pubDate><atom:updated>2009-07-04T00:35:43.793+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel Functions</category><title>SUMPRODUCT function</title><description>&lt;p&gt;&lt;font face="verdana"&gt;The SUMPRODUCT in MS Excel is useful when you want a multiple a set of values to another set of value. This formula is very useful in scenario when you want to calculate the total sales value or cost. Let's take look at syntax.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font face="verdana"&gt;Syntax: SUMPRODUCT(array1, array2, array3....)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font face="verdana"&gt;Table &lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;span class="fullpost"&gt;  &lt;table cellspacing="0" cellpadding="2" width="214" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;strong&gt;&lt;font face="verdana"&gt;Set A&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;strong&gt;&lt;font face="verdana"&gt;Set B&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;font face="verda"&gt;a1&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;font face="verda"&gt;b1&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;font face="verda"&gt;a2&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;font face="verda"&gt;b2&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;font face="verda"&gt;a3&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;font face="verda"&gt;b3&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;font face="verda"&gt;a4&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;font face="verda"&gt;b4&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;font face="verda"&gt;.&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;font face="verda"&gt;.&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="108"&gt;&lt;font face="verda"&gt;an&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="104"&gt;&lt;font face="verda"&gt;bn&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;font face="verdana"&gt;SUMPRODUCT({a1, a2, a3, a4...an}, {b1, b2, b3, b4...bn}) = a1 X b1+a2 X b2+a3 X b3+a4 X b4....an X bn&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="verdana"&gt;Click on image below to Enlarge&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a title="MS Excel Sumproduct example" href="http://num2text.googlepages.com/Sumproduct.JPG" target="_blank"&gt;&lt;img height="127" src="http://num2text.googlepages.com/Sumproduct.JPG" width="120" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font face="verdana"&gt;In the above example, we have describe an example to calculate Total sales value and Total Cost value. Also, I have enclosed the link with example of SUMPRODUCT formula. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="MS Excel: Sum product Example" href="http://num2text.googlepages.com/SUMPRODUCT.xls" target="_blank"&gt;&lt;strong&gt;&lt;font face="verdana"&gt;Click here to download SUM Product Example&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="verdana"&gt;Kindly let me us know your comment about this post. Also, you can subscribe to this blog to receive latest update in your inbox. Click on the link below&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US"&gt;&lt;strong&gt;&lt;font face="Verdana" color="#0080ff"&gt;Subscribe to blog via Email&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/05/sumproduct-function.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6120009590403615075.post-2017361344685635004</guid><pubDate>Wed, 29 Apr 2009 19:18:00 +0000</pubDate><atom:updated>2009-07-04T00:50:05.034+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">VBA</category><title>VBA, For Next loop</title><description>&lt;p&gt;For next is looping method when you are definite about number of values you want to scan/test. However, you will have to use &lt;a href="http://findsarfaraz.blogspot.com/2009/03/vba-if-then-condition.html" target="_blank"&gt;IF then&lt;/a&gt; to test the values. Lets take a look at very basic example of For Next loop and then we will move at little complex examples.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;/p&gt; &lt;span class="fullpost"&gt; &lt;p&gt;For counter = startvalue to endvalue    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Operation you want to perform     &lt;br /&gt;Next counter     &lt;br /&gt;Next counter increase the value to loop till counter reaches end value&lt;/p&gt;  &lt;p&gt;Here you want to just enter random numbers starting from active cell to next 10 row using VBA/Macro code&lt;/p&gt;  &lt;h1&gt;&lt;font size="2"&gt;For Next loop Example 1&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub Fornextloop1()      &lt;br /&gt;Dim i As Integer&lt;/font&gt;     &lt;br /&gt;&lt;font color="#008040"&gt;'We will use i as counter&lt;/font&gt;     &lt;br /&gt;&lt;font color="#0000ff"&gt;For i = 0 To 9      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i, 0) = WorksheetFunction.RandBetween(25, 250)       &lt;br /&gt;Next i &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Note: Code&amp;#160;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i, 0) = WorksheetFunction.RandBetween(25, 250) may not work with MS Office 2003 or previous version. Please replace the following code with &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;ActiveCell.Offset(i, 0) = WorksheetFunction.Rand(25, 250) &lt;/p&gt;  &lt;p&gt;Similary, if you want to list of 10 values of actual and 10 values of target lying in set of adjacent cells and you want to find out whether actual have exceeded the target or not. &lt;/p&gt;  &lt;h1&gt;&lt;font size="2"&gt;For Next loop Example 2&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Sub Fornextloop2()    &lt;br /&gt;Dim i As Integer     &lt;br /&gt;&lt;font color="#008040"&gt;'We will use i as counter&lt;/font&gt;     &lt;br /&gt;&lt;font color="#0000ff"&gt;For i = 0 To 9      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; If ActiveCell.Offset(i, 0) &amp;gt;= ActiveCell.Offset(i, 1) Then       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i, 2) = &amp;quot;MET&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Else       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i, 2) = &amp;quot;NOT MET&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End If       &lt;br /&gt;Next i &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Here in the above examples we are taking increment of 1 only. In case if you want to have increment of more than 1 than you can take look at example where I have illustrated Example 1 but you only want to put even numbers. Like 2, 4, 6.... 20&lt;/p&gt;  &lt;h1&gt;&lt;font size="2"&gt;For Next loop Example 3&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub Fornextloop3()      &lt;br /&gt;Dim i As Integer&lt;/font&gt;     &lt;br /&gt;&lt;font color="#008000"&gt;'We will use i as counter&lt;/font&gt;     &lt;br /&gt;&lt;font color="#0000ff"&gt;For i = 0 To 20 &lt;strong&gt;Step 2        &lt;br /&gt;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i / 2, 0) = i       &lt;br /&gt;Next i       &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; makes the counter incremented by 2 each time. Also, i / 2 under offset ensures that each value in inserted in row. Only i will insert values in alternate cells.&lt;/p&gt;  &lt;p&gt;You may think is it necessary always to increase value of counter can't we decrease the value of counter. Yes, we can do that as well. Next example illustrate the same. Now, we want to scan all the rows starting from 40th row and move to 1st row. Also, we want to highlight values above certain threshold (Here I have take 30 as threshold).&lt;/p&gt;  &lt;h1&gt;&lt;font size="2"&gt;For Next loop Example 4&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub Fornextloop4()     &lt;br /&gt;Dim i As Integer      &lt;br /&gt;&lt;font color="#008000"&gt;'We will use i as counter&lt;/font&gt;      &lt;br /&gt;ActiveSheet.Cells(1, 1).Select      &lt;br /&gt;For i = 39 To 1 Step -1      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If ActiveCell.Offset(i, 0) &amp;gt; 30 Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i, 0).Interior.ColorIndex = 3      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;Next i      &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;&lt;strong&gt;Step -1 &lt;/strong&gt;decreases the value of i by 1.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;Next example will shows us how to run nested &lt;strong&gt;For Next loop &lt;/strong&gt;which is of extremely use full when you want to move across rows and columns at a time. I am using the example similar as previous one. &lt;/font&gt;&lt;/p&gt;  &lt;h1&gt;&lt;font size="2"&gt;For Next loop Example 5&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;Sub Fornextloop5()     &lt;br /&gt;Dim i As Integer      &lt;br /&gt;Dim j As Integer      &lt;br /&gt;&lt;font color="#008000"&gt;'We will use i as counter&lt;/font&gt;      &lt;br /&gt;ActiveSheet.Cells(1, 1).Select      &lt;br /&gt;For i = 11 To 1 Step -1      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;#160;&amp;#160;&amp;#160; For j = 11 To 1 Step -1     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If ActiveCell.Offset(i, j) &amp;gt; 30 Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ActiveCell.Offset(i, j).Interior.ColorIndex = 3      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Next j      &lt;br /&gt;Next i      &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I am sure this post will help you in applying &lt;strong&gt;For Next Loop. &lt;/strong&gt;In case if you find difficult to use in your MS Excel Sheet. I would suggest you download file with Example. Press Alt + F11 to view code and press Alt+ F8 to run the code.&lt;/p&gt;  &lt;p&gt;&lt;a title="MS Excel, For next loop Example" href="http://num2text.googlepages.com/FORNEXT.xls" target="_blank"&gt;&lt;strong&gt;For Next Example&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please do let me know your comments about my attempt to help beginners with For Next loop. Also, you can &lt;strong&gt;&lt;a title="MS Excel help" href="http://feedburner.google.com/fb/a/mailverify?uri=blogspot/rtws&amp;amp;loc=en_US" target="_blank"&gt;subscribe via email&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;We assure you knowledge, not SPAM!&lt;/strong&gt;&lt;/p&gt; &lt;/span&gt;  </description><link>http://findsarfaraz.blogspot.com/2009/04/vba-for-next-loop.html</link><author>noreply@blogger.com (Sarfaraz Ahmed)</author><thr:total>4</thr:total></item></channel></rss>