<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Learnitix - Learn Analytics on Medium]]></title>
        <description><![CDATA[Stories by Learnitix - Learn Analytics on Medium]]></description>
        <link>https://medium.com/@learnitix?source=rss-deeaefe133a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pkWBwwx9EHzMiQ0c</url>
            <title>Stories by Learnitix - Learn Analytics on Medium</title>
            <link>https://medium.com/@learnitix?source=rss-deeaefe133a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:48:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@learnitix/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is if statement in VBA? What is if then else statement in VBA? Nested if in VBA]]></title>
            <link>https://medium.com/@learnitix/what-is-if-statement-in-vba-what-is-if-then-else-statement-in-vba-nested-if-in-vba-c7753c0526de?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7753c0526de</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:57:21 GMT</pubDate>
            <atom:updated>2021-07-28T17:57:21.341Z</atom:updated>
            <content:encoded><![CDATA[<p>VBA if statement is a conditional statement where code run based on conditions. If the condition is satisfied then we can mention in the code what we want and else what we want. That’s why it is also called if then else statement in VBA. It is very much similar to excel if. In VBA if we need to write the codes and in excel we mention the condition in the formula itself.</p><h3>Nested if in VBA | Can you have an if statement inside an if statement VBA?</h3><p>Nested if in VBA means using the if statement inside the if statement. It similar to nested if in excel where we use multiple ifs in one single formula but in VBA we will be using multiple if statements within the if statement.</p><p><strong>VBA if statement syntax</strong></p><p><strong>Sub if_statement()</strong></p><p><strong>If condition then VBA codes</strong></p><p><strong>Else if condition then VBA codes</strong></p><p><strong>Else VBA codes</strong></p><p><strong>End if</strong></p><p>We must close the if statement with <strong>end if</strong> in the last else the code will throw us the error.</p><p>Let’s understand this with a practical example. Below is the data and let’s say we want to color this data with blue, green, red and yellow color based on the condition or text mentioned in H2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*k8ZxWlxdSfyibk5R.png" /></figure><p>In H2 I have created a validation in which color names are listed.</p><p>Now the ask is when we change the name of the color in validation, the same color should be applied on data when a button is clicked to initiate the code.</p><p><strong>VBA code:</strong></p><p><strong>Sub if_statement_in_VBA()</strong></p><p><strong>If Range(“h2”).Value = “Blue” Then</strong></p><p><strong>Range(“a1”).CurrentRegion.Interior.Color = vbBlue</strong></p><p><strong>ElseIf Range(“h2”).Value = “Green” Then</strong></p><p><strong>Range(“a1”).CurrentRegion.Interior.Color = vbGreen</strong></p><p><strong>ElseIf Range(“h2”).Value = “Red” Then</strong></p><p><strong>Range(“a1”).CurrentRegion.Interior.Color = vbRed</strong></p><p><strong>Else</strong></p><p><strong>Range(“a1”).CurrentRegion.Interior.Color = vbBlue</strong></p><p><strong>End If</strong></p><p><strong>End Sub</strong></p><p><strong>Explanation</strong>: “<strong>If Range(“h2”).Value = “Blue</strong>” “ this is the first condition in the codes.it will check if the ‘h2’ cell has the cell value “Blue” if it is then it will color the data with blue color using the code “</p><p><strong>Range(“a1”).CurrentRegion.Interior.Color = vbBlue</strong>”. Make sure your write vb before the color name in the code else VBA will not identify that this is the color you want to apply. So if the first condition is satisfied then it will color the data with blue color and if not satisfied then it will move to the next condition which is mentioned in else if. You can use any number of else if depending on your requirement. So I have used 1 if and 3 else if here to check 3 conditions and in the last, I have used an else statement means if no condition is satisfied then it will color the data with blue color as mentioned in the else code. Make sure the close the if statement with end if in the last.</p><p>Now we can create a button to execute the codes. You can use any image or shape and assign your macro to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*1MdoB5Hk0DFg7RlO.png" /></figure><p>Now change the value in the h2 cell to green and click on the button. Output is shared below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*-bLP5zIWdpcfkrgd.png" /></figure><p>Now change the cell value to ‘red’ and click on the button.</p><p><strong>Output</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*sZxu1NPc5P2uBxRz.png" /></figure><p>So this how you can excel VBA if statement with multiple conditions.</p><p>I hope I am able to make you understand the logic. Thank you! Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/VBA-Formula-functions-range-Property-VBA.html"><strong>Previous Chapter</strong></a> — <a href="https://www.learnitixs.com/2021/05/VBA-Event-Workbook-Event-Worksheet-Event-Event-Trigger.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/06/Data-Compilation-Macro-Project-Explained.html">How to compile the data from multiple workbooks to one workbook using Excel VBA? — Explained</a></p><p><a href="https://www.learnitixs.com/2021/06/copy-paste-data-from-one-workbook-to-another-using-excel-vba.html">How to copy data from one workbook and paste it into another using Excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/06/how-to-create-charts-in-vba-explained.html">How to create charts in VBA? — Explained with Examples</a></p><p><a href="https://www.learnitixs.com/2021/05/Last-row-LR-Concept-VBA.html">How to get the Last Row of the data? The LR concept — Learn Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/06/Error-Handling-Techniques-On-error-goto-on-error-resume-next.html">How to handle errors in Excel VBA? What are the different techniques to handle errors in VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/File-dialogue-getopenfilename-workbook-property.html">How to open a workbook from the local drive in Excel VBA? GetopenfileName Property Explained</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-cells-or-group-of-cells.html">How to select cells or group of cells using cells properties in excel using excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-cellsgroup-of-cells-or.html">How to select cells/group of cells or range in excel using Excel VBA? — Learnitix</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7753c0526de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to apply formula in excel using VBA? Formula property in VBA | Learnitix]]></title>
            <link>https://medium.com/@learnitix/how-to-apply-formula-in-excel-using-vba-formula-property-in-vba-learnitix-7daacae3bcbd?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7daacae3bcbd</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[excel]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:56:04 GMT</pubDate>
            <atom:updated>2021-07-28T17:56:04.613Z</atom:updated>
            <content:encoded><![CDATA[<h3>How do I use a Formula in VBA? How do you call a formula in VBA? How do I create a formula cell in VBA? How to write an excel formula in VBA code? How to use a formula in VBA code?</h3><p>These are some common questions that I come across and will solve all these questions in this post.</p><p>Writing VBA functions or VBA formula is a very important thing in VBA because we know <a href="https://www.learnitixs.com/p/learn-excel-functions.html">excel functions</a> are the backbone of excel and we take out meaningful data or insights in excel using these functions. there are huge numbers of functions but there are some functions that are used so frequently. We Will write VBA functions for all these functions which are common to use like V-look up, text functions, etc.</p><h3>Use of Sum formula in VBA</h3><p>Below is the data and let’s say we need to apply sum function in this data, to sum up the numbers. Let’s write VBA code to do this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*yWG51KfR4JfKlnHS.png" /></figure><p>Here we need to apply the sum formula in the range g2:g13.</p><p>VBA code:</p><p><strong>Sub vbacode_to_sum()</strong></p><p><strong>Range(“g2:g13”).Formula = “=SUM(B2:F2)”</strong></p><p><strong>End Sub</strong></p><p><strong>Explanation:</strong></p><p>Here, “formula” is the VBA property of range, and using it you can apply any function of Excel in VBA. Just write the formula in the first cell of the range and copy the formula and put it in the code as shown above and the formula will be applied to the range specified.</p><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*PLAIcTxm7gTgzvMY.png" /></figure><h3>Use of Left Function in VBA</h3><p>You can make use of other text functions as well like find function, trim function, right function, mid function, etc in the same way we apply the left function here.</p><p>Suppose from the below data we want to extract the first name. so let’s take it out using VBA code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/0*Qfuy8vVKiKGwTegY.png" /></figure><p>VBA code:</p><p><strong>Sub vbacode_left_function()</strong></p><p><strong>Range(“s3:s6”).Formula = “=LEFT(R3,FIND(“” “”,R3)-1)”</strong></p><p><strong>End Sub</strong></p><p><strong>Explanation:</strong></p><p>Here, we have taken out using the find and text function. Find function here is helping us to get the number of characters by finding out the position of space and subtracting one from it to get the exact characters count of first name and then we are using the left function to extract these characters from the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*hvq5t8SsoNN6yDpi.png" /></figure><h3>Use of if formula in VBA</h3><p>If function in VBA is also important formula. We have data below and we need to check who is pass and who is failing. Condition is if scores are greater than 50 then pass else fail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/0*ChHa5aCsN-IOP3Pq.png" /></figure><p>VBA code:</p><p><strong>Sub vbacode_if_function()</strong></p><p><strong>Range(“t3:t6”).Formula = “=IF(S3&gt;50,””Pass””,””Fail””)”</strong></p><p><strong>End Sub</strong></p><p><strong>Explanation:</strong></p><p>Here in the code, you can observe I have used double inverted commas. So make sure when you are using any formula in VBA the inverted commas should be double except the starting one and the ending one else code will throw an error.</p><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*HVAHy5a2MvwBmL8y.png" /></figure><h3>Using V-look formula in VBA</h3><p>Using the vlook up function is also not very typical and easy to use as the above ones. You just need to use the formula property of range and write the vlook up function as we have written the if and left function.</p><p>You can use any formula or function in VBA using this method. Just write the formula in excel and copy it and paste it in the VBA code between inverted commas. You just need to specify the range where you want the formula to be executed.</p><p>Below is the data and we want to get the scores using vlook up function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/0*6S4lXmPqoMEaw0Pr.png" /></figure><p>VBA code:</p><p><strong>Sub vbacode_vlook_up_function()</strong></p><p><strong>Range(“s13:s14”).Formula = “=VLOOKUP(R13,$R$2:$S$6,2,0)”</strong></p><p><strong>End Sub</strong></p><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*Sz1U0UHHUwqEOApJ.png" /></figure><p>I hope I am able to make understand the concept. Thank you! Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/adding-sheets-excel-vba.html"><strong>Previous Chapter</strong></a><strong> — </strong><a href="https://www.learnitixs.com/2021/05/nested-if-vba-conditional-statement-vba-else-if-end-if-vba-code.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/05/how-to-use-macro-recording-feature-in.html">How to use Macro recording feature in Excel? — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/msgbox-if-statement-vbyesno-vbokcancel-vbacodes.html">How to use MsgBox with if statement in VBA? How to use MsgBox buttons in excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/06/While-wend-loop-excel-vba.html">How to use While Wend loop in Excel VBA? How do you End While loop in VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-use-paste-special-using-vba-codes.html">How to use paste special using VBA Codes? | VBA Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/is-vba-important-for-career-in-analytics.html">Is VBA important for a career in Analytics? — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/udf-get-characters-count-from-selected.html">UDF — Get the characters count from the selected cells in Excel VBA — VBA codes</a></p><p><a href="https://www.learnitixs.com/2021/06/udf-get-sum-of-digits-of-colored-cells.html">UDF — Get the sum of numbers of colored cells only — Learn Excel VBA — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/04/vba-overview-applications-how-to-use.html">VBA : Overview, Applications &amp; How To Use — Learnitix</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7daacae3bcbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding & Deleting sheets in Excel using Excel VBA — Excel VBA]]></title>
            <link>https://medium.com/@learnitix/adding-deleting-sheets-in-excel-using-excel-vba-excel-vba-1b2e4b63192?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b2e4b63192</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:54:47 GMT</pubDate>
            <atom:updated>2021-07-28T17:54:47.663Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adding &amp; Deleting sheets in Excel using Excel VBA — Excel VBA</h3><p>You can add an excel sheet in <a href="https://www.learnitixs.com/2021/05/important-hotkeys-that-will-improve.html">Microsoft Excel using hotkey shift+f11</a> and delete a worksheet using hotkey alt+EL but how can we add a sheet and delete a sheet in Microsoft Excel using VBA codes. Below are the codes that you can use for this.</p><h3>Add a sheet</h3><p><strong>Sub working-with-sheets()</strong></p><p><strong>Sheets.Add</strong></p><p><strong>End Sub</strong></p><h3>Delete a sheet</h3><p><strong>Sub working_with_sheets()</strong></p><p><strong>ActiveSheet.Delete</strong></p><p><strong>End Sub</strong></p><p>Deleting a sheet using VBA code may pop up in the below window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/0*IE37xtqtc7L6egfe.png" /></figure><p>To avoid this pop up you can add one line in the code as shown below in the code.</p><p><strong>Sub workingwithsheets()</strong></p><p><strong>Application.displayalerts = False</strong></p><p><strong>ActiveSheet.Delete</strong></p><p><strong>End Sub</strong></p><p>You can also rename your current excel sheet using the below VBA code.</p><p><strong>Sub working_with_sheets()</strong></p><p><strong>ActiveSheet.Name = “abc”</strong></p><p><strong>End Sub</strong></p><p>In case you come across any challenge or need any clarification, please drop a comment below.</p><p>Thank you! Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/special-cells-VBA-deleting-blank-rows.html"><strong>Previous Chapter</strong></a><strong> — </strong><a href="https://www.learnitixs.com/2021/05/VBA-Formula-functions-range-Property-VBA.html"><strong>Next Chapter</strong></a></p><p><strong>Popular Articles</strong></p><p><a href="https://www.learnitixs.com/2021/05/variable-types-in-python.html">Data Types in Python | Python Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/Python-Application-Machine-Learning.html">Python: Outline, Applications, and How to Use — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/the-while-and-for-loop-in-python.html">The “While” and “For” Loop in Python | Python Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/the-if-statement-in-python.html">The ‘If’ Statement in Python | Python Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/working-with-data-types-in-python.html">Working with Variables and Data types in Python | Python Codes | Learnitix</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b2e4b63192" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deleting blank rows from data in excel using special cells concept — Excel VBA]]></title>
            <link>https://medium.com/@learnitix/deleting-blank-rows-from-data-in-excel-using-special-cells-concept-excel-vba-945df5bd8834?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/945df5bd8834</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:53:19 GMT</pubDate>
            <atom:updated>2021-07-28T17:53:19.634Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deleting blank rows from data in excel using special cells concept — Excel VBA</h3><h3>Special cells are a very important concept in both excel and excel VBA. Let’s first understand how can we delete blank rows from data using special cells in excel first then we will write its VBA code to delete blank rows.</h3><p>Below is the data from which we need to remove blank rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*RsSmFMSICnzRmnJY.png" /></figure><p>Now the first step is to select the first column as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/0*hi0Fg1akI0a4f3Mz.png" /></figure><p>Now press <strong>F5</strong> to bring the special cells dialogue box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/0*ewJZDOInbAA_CNqQ.png" /></figure><p>Now click on the special button and it will pop the below dialogue box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/0*Z3nq2dp22nylAK3E.png" /></figure><p>Now click on “Blanks” and then ok. It will select all the blank cells in the column you selected initially.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/0*qt7Zjqy5hl2sBMeT.png" /></figure><p>Now press control+”-“ and it will bring up the below options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/182/0*pb88fzjPyyfqv_VF.png" /></figure><p>Select the entire row and click ok.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*6DJRlNWOhVasE8Up.png" /></figure><p>You will observe your blank rows are deleted. There are many steps to do this thing but if you use VBA code then you just need to write single to delete blank rows from data using special cells.</p><p>Code:</p><p><strong>Sub special_cellss()</strong></p><p><strong>Range(“a:a”).SpecialCells(xlCellTypeBlanks).EntireRow.Delete</strong></p><p><strong>End Sub</strong></p><p>The above is very simple and do not need to select the column just write this code in the VBA module and press <strong>f5 </strong>and it will automatically delete blank rows from your dataset. It’s a generic code you can copy-paste it and it will work the same way. Or you can assign this code to a button.</p><p>Try it by yourself and comment below in case you come across any challenge. Thank you! Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/Data-Sorting-Excel-VBA.html"><strong>Previous Chapter </strong></a><strong>— </strong><a href="https://www.learnitixs.com/2021/05/adding-sheets-excel-vba.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/06/Creating-UDFs-VBA-Codes-Customized.html">What are UDF’s in VBA? How to Write UDF function in Excel VBA? Examples of UDF’s</a></p><p><a href="https://www.learnitixs.com/2021/05/VBA-Event-Workbook-Event-Worksheet-Event-Event-Trigger.html">What are events in VBA? How do I create an event in VBA? — Explained with Examples</a></p><p><a href="https://www.learnitixs.com/2021/05/Data-Types-VBA-Integer-Double-Long-String.html">What are the Data Types in Excel VBA? How to define variables? — Learn Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/05/VBA-Variables-Global-Variable-Static-variable-Local-Variable.html">What are variables in VBA? How do you declare a variable in VBA? — Learn Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/06/for-each-loop-for-each-cell-for-each-sheet-.html">What is For Each Loop in Excel VBA? How to use For Each Loop in Excel VBA?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=945df5bd8834" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Applying data sorting concept on a Data in Microsoft excel using VBA — Excel VBA]]></title>
            <link>https://medium.com/@learnitix/applying-data-sorting-concept-on-a-data-in-microsoft-excel-using-vba-excel-vba-21318353dac5?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/21318353dac5</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:51:47 GMT</pubDate>
            <atom:updated>2021-07-28T17:51:47.246Z</atom:updated>
            <content:encoded><![CDATA[<h3>Applying data sorting concept on a Data in Microsoft excel using VBA — Excel VBA</h3><p>Data Sorting is another concept that is very useful while working on the data. You may need to sort your data from A to Z or Z to A or numerically in ascending and descending order. In excel it’s very much simple you just need to use a simple hotkey that is alt+ds and it will pop the dialogue box in which you can set the sorting criteria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/0*hRepcQikKpkniFEq.png" /></figure><p>But what if we want to sort the data using VBA codes. Let’s write some codes to sort the data using VBA codes.</p><p>Code:</p><p><strong>Sub sortingg()</strong></p><p><strong>Range(“a1”).CurrentRegion.Sort key1:=Range(“a1”), order1:=xlDescending, Header:=xlYes</strong></p><p><strong>End Sub</strong></p><p><strong>Code explanation:</strong></p><p>The <a href="https://www.blogger.com/blog/page/edit/2871750345180361442/8948019488027540901#">current region is the concept</a> to select the whole data. Sort is the keyword in VBA to do the sorting.</p><p>Then we need to provide the key. Key is basically the column basis on which we want to sort the data. Here we need to give the reference of the first cell so apply to sort on that column so we have given range(“a1”) because we want to sort the data based on the name column. Then you need to mention the order in the coding. Order means how you want to sort your data — Ascending or Descending. It works for both text and numerical data. If data is alphabetical then it will sort a to z or z to a and if it is numerical then it will work in ascending or descending order. In the last, you need to provide header information. If you want your data headers to be sorted up as well then mention “xlno” and if you want to exclude your headers from sorting then mention “xlyes”.</p><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*voDNP5fY1yJRuaq6.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/0*e1qSmKRNwmPOsg59.png" /></figure><p>I hope I am able to make you understand the concept. If you need any clarification please drop a comment. Thank you! Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/filters-advanced%20filters-%20Microsoft%20excel.html"><strong>Previous Chapter</strong></a><strong> — </strong><a href="https://www.learnitixs.com/2021/05/special-cells-VBA-deleting-blank-rows.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/06/offset-resize-concept-excel-vba.html">What is Offset &amp; Resize in Excel VBA? How to use Offset and Resize in Excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/06/option-explicit-option-implicit-excel-vba-codes.html">What is Option Explicit and Option Implicit In VBA? Why its is used?</a></p><p><a href="https://www.learnitixs.com/2021/05/what-is-usedrange-and-how-it-is-used.html">What is UsedRange and How it is used in VBA? | VBA Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/what-is-with-statement-and-how-it-is.html">What is With Statement and how it is used in VBA? | VBA Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/For-loop-Excel-VBA.html">What is a for loop in Excel VBA? How do you write a for loop in VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/what-is-current-region-and-how-it-is.html">What is current Region and how it is used in excel VBA? | VBA Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/nested-if-vba-conditional-statement-vba-else-if-end-if-vba-code.html">What is if statement in VBA? What is if then else statement in VBA? Nested if in VBA</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21318353dac5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Applying filters and advanced filters on Data in Microsoft excel using VBA — Excel VBA]]></title>
            <link>https://medium.com/@learnitix/applying-filters-and-advanced-filters-on-data-in-microsoft-excel-using-vba-excel-vba-d878852fd634?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d878852fd634</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:49:46 GMT</pubDate>
            <atom:updated>2021-07-28T17:49:46.220Z</atom:updated>
            <content:encoded><![CDATA[<h3>Applying filters and advanced filters on Data in Microsoft excel using VBA — Excel VBA</h3><p>Filters are a very useful concept in Microsoft Excel or any tool on which we can hold the data and do data analysis. <strong>Filters help in showing the data which we want to see or want to work on instead of working on the whole data</strong>. In Excel, we can simply apply filters using a <a href="https://www.learnitixs.com/2021/05/5-excel-hotkeys-that-can-make-your-life.html">quick hotkey</a> that is Alt+DFF but what if we want to filter the data using VBA. It might be required to filter the data using VBA when we are automating a set of data to convert it into a format that will give us meaningful findings. It’s a very common concept in data handling. Let’s understand how can we write VBA code to filter the data.</p><p>A simple dataset is shown below on which we will apply the filters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/0*DyGpeLsvkkLscwga.png" /></figure><p>Now let’s write a VBA code to filter only Gaurav’s Data.</p><p>Code:</p><p><strong>Sub filterss()</strong></p><p><strong>Range(“a1”).CurrentRegion.AutoFilter field:=1, Criteria1:=”Gaurav”</strong></p><p><strong>End Sub</strong></p><p><strong>Code explanation:</strong></p><p><a href="https://www.learnitixs.com/2021/05/what-is-current-region-and-how-it-is.html">Current region</a> is the concept of selecting the whole data as we do it in excel using control+A hotkey.</p><p>Autofilter is the keyword to apply filter and field is the keyword to mention the column number on which we want to apply the filter and then give it criteria like what we want to filter in the particular column. In our example it’s Gaurav then it will filter the data of only Gaurav.</p><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*LMQS2modHdEjWKwy.png" /></figure><p>Now what if we want to apply the filter on multiple columns one after the other, In this case, we can write the codes as shown below.</p><p>Code:</p><p><strong>Sub filters()</strong></p><p><strong>Range(“a1”).CurrentRegion.AutoFilter field:=1, Criteria1:=”Gaurav”</strong></p><p><strong>Range(“a1”).CurrentRegion.AutoFilter field:=2, Criteria1:=81</strong></p><p><strong>End Sub</strong></p><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/0*Igu-RoSvZ94Z9lsX.png" /></figure><p>Similarly, you can apply the filters on other columns as well. Please drop a comment if you need further clarification on this topic.</p><p>Thank you! Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/how-to-use-paste-special-using-vba-codes.html"><strong>Previous Chapter</strong></a><strong> — </strong><a href="https://www.learnitixs.com/2021/05/Data-Sorting-Excel-VBA.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/05/VBA-Formula-functions-range-Property-VBA.html">How to apply formula in excel using VBA? Formula property in VBA | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/Data-Compilation-Macro-Project-Explained.html">How to compile the data from multiple workbooks to one workbook using Excel VBA? — Explained</a></p><p><a href="https://www.learnitixs.com/2021/06/copy-paste-data-from-one-workbook-to-another-using-excel-vba.html">How to copy data from one workbook and paste it into another using Excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/06/how-to-create-charts-in-vba-explained.html">How to create charts in VBA? — Explained with Examples</a></p><p><a href="https://www.learnitixs.com/2021/05/Last-row-LR-Concept-VBA.html">How to get the Last Row of the data? The LR concept — Learn Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/06/Error-Handling-Techniques-On-error-goto-on-error-resume-next.html">How to handle errors in Excel VBA? What are the different techniques to handle errors in VBA?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d878852fd634" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use paste special using VBA Codes? | VBA Codes | Learnitix]]></title>
            <link>https://medium.com/@learnitix/how-to-use-paste-special-using-vba-codes-vba-codes-learnitix-8209134d7364?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8209134d7364</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:48:29 GMT</pubDate>
            <atom:updated>2021-07-28T17:48:29.889Z</atom:updated>
            <content:encoded><![CDATA[<p>Paste special is a very common functionality of excel that we use so frequently while working on the data. We may need to paste the Values, formatting, or formulas using paste special instead of pasting the data with all the components included. But how we can use paste special in excel VBA codes. Let’s understand with an example.</p><p>Suppose below is the data that has all the components included that is Values, Formatting (borders &amp; colors ), Formulas, and comments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*qw47oru0D0My10NU.png" /></figure><p>Let’s copy the data from sheet5 using VBA codes.</p><p><strong>Sub Paste_special()</strong></p><p><strong>Sheets(“Sheet5”).select</strong></p><p><strong>Range(“a1”).currentregion.copy</strong></p><p><strong>End Sub</strong></p><p>The above codes will copy the data from sheet5 and let’s say we want to paste it into sheet4.</p><p><strong>Sub Paste_special()</strong></p><p><strong>Sheets(“Sheet5”).select</strong></p><p><strong>Range(“a1”).currentregion.copy</strong></p><p><strong>Sheets(“Sheets4”).select</strong></p><p><strong>End Sub</strong></p><p>Sheets(“Sheets4”).select — This code will activate the sheet4 on which we want to paste the data.</p><p>Now select the cell and use paste special property to paste only Values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*K4pic2Fbowf5BByb.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*6R7QiKj_o6cFgNWA.png" /></figure><p>You will see many properties that you can use in paste special. Select the one you want to use. Let’s in the example, will use “xlpastevalues” to paste only the values.</p><p><strong>Codes:</strong></p><p><strong>Sub paste_special()</strong></p><p><strong>Sheets(“Sheet5”).Select</strong></p><p><strong>Range(“a1”).CurrentRegion.Copy</strong></p><p><strong>Sheets(“Sheet4”).Select</strong></p><p><strong>Range(“a1”).PasteSpecial (xlPasteValues) ‘ to paste values</strong></p><p><strong>Range(“a1”).PasteSpecial (xlPasteFormats) ‘ To paste the formats</strong></p><p><strong>Range(“a1”).PasteSpecial (xlPasteComments) ‘ To paste the comments</strong></p><p><strong>Range(“a1”).PasteSpecial (xlPasteFormulas) ‘ to paste the formulas</strong></p><p><strong>End Sub</strong></p><p>Output: Only values got pasted in sheet4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*9ZoJKC_30hui3DHA.png" /></figure><p>Similarly, you can use other properties as well like pasting only the formats or formulas or comments may be.</p><p>I hope I made you understand the logic. Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/how-to-copy-paste-data-from-one-place.html"><strong>Previous Chapter </strong></a><strong>— </strong><a href="https://www.learnitixs.com/2021/05/filters-advanced%20filters-%20Microsoft%20excel.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/05/File-dialogue-getopenfilename-workbook-property.html">How to open a workbook from the local drive in Excel VBA? GetopenfileName Property Explained</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-cells-or-group-of-cells.html">How to select cells or group of cells using cells properties in excel using excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-cellsgroup-of-cells-or.html">How to select cells/group of cells or range in excel using Excel VBA? — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-multiple-rows-and-columns.html">How to select multiple rows and columns in excel using excel VBA? | VBA Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-use-macro-recording-feature-in.html">How to use Macro recording feature in Excel? — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/msgbox-if-statement-vbyesno-vbokcancel-vbacodes.html">How to use MsgBox with if statement in VBA? How to use MsgBox buttons in excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/06/While-wend-loop-excel-vba.html">How to use While Wend loop in Excel VBA? How do you End While loop in VBA?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8209134d7364" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Copy Paste data from one place to another place or one worksheet to another worksheet using…]]></title>
            <link>https://medium.com/@learnitix/how-to-copy-paste-data-from-one-place-to-another-place-or-one-worksheet-to-another-worksheet-using-ea86679bff1?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea86679bff1</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:46:47 GMT</pubDate>
            <atom:updated>2021-07-28T17:46:47.410Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Copy Paste data from one place to another place or one worksheet to another worksheet using Excel VBA?</h3><p>Suppose below shown data is the data that we want to copy and paste it in a different place on the sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/0*Gzr2rP1Cg1tK5uli.png" /></figure><p>To copy this data, use the below code. This code will copy the data without knowing the exact address of the range.</p><p><strong>Sub Copy_paste_Data()</strong></p><p><strong>Range(“a1”).currentregion.select</strong></p><p><strong>End Sub</strong></p><p>Now, mention the cell where you want to paste this data. See below code for reference.</p><p><strong>Sub Copy_paste_Data()</strong></p><p><strong>Range(“a1”).currentregion.select</strong></p><p><strong>Range(“k1”).select</strong></p><p><strong>End Sub</strong></p><p>Now this code (Range(“k1”).select) will put our cursor on K1 cell and will make it the Activecell. Now use the below code to paste the copied data here.</p><p><strong>Sub Copy_paste_Data()</strong></p><p><strong>Range(“a1”).currentregion.select</strong></p><p><strong>Range(“k1”).select</strong></p><p><strong>Activesheet.paste</strong></p><p><strong>End Sub</strong></p><p>Your data will be pasted on the K1 cell as shown below the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/0*GtUPgmuAa7tlaRYf.png" /></figure><p><strong>Copy-pasting data from one sheet to another</strong></p><p>Now we will copy the same data and will paste it into a different sheet. Code will remain the same as what we have discussed above. In this case, we just need to give the sheet name as well in the code where we want to paste our data. Let’s do it step by step.</p><p>Below is the data that is in sheet2 and we will paste it into sheet3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*LFyEzZTxQzhtYqHT.png" /></figure><p>First of all, we need to mention the sheet in the code from where we want to copy the data. Use the below code.</p><p><strong>Sub Copy_paste_from_sheet()</strong></p><p><strong>Sheets(“Sheet2”).select</strong></p><p><strong>End Sub</strong></p><p>Now copy the data in this sheet.</p><p><strong>Sub Copy_paste_from_sheet()</strong></p><p><strong>Sheets(“Sheet2”).select</strong></p><p><strong>Range(“a1”).currentregion.copy</strong></p><p><strong>End Sub</strong></p><p>Now mention the name of the sheet where we want to paste the data.</p><p><strong>Sub Copy_paste_from_sheet()</strong></p><p><strong>Sheets(“Sheet2”).select</strong></p><p><strong>Range(“a1”).currentregion.copy</strong></p><p><strong>Sheets(“sheet3”).select</strong></p><p><strong>End Sub</strong></p><p>Mention the range where we want to paste the data.</p><p><strong>Sub Copy_paste_from_sheet()</strong></p><p><strong>Sheets(“Sheet2”).select</strong></p><p><strong>Range(“a1”).currentregion.copy</strong></p><p><strong>Sheets(“sheet3”).select</strong></p><p><strong>Range(“a1”).select</strong></p><p><strong>Activesheet.paste</strong></p><p><strong>End Sub</strong></p><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/0*fojCOXzUrtsW2Nbk.png" /></figure><p>The above code will copy the data from sheet2 and will paste the same in sheet3 and in cell a1.</p><p>You can copy the code in the module and run using the F5 key to watch it running in the live environment.</p><p>I hope I am able to make you understand the logic.</p><p>Happy Learning!</p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/05/how-to-use-paste-special-using-vba-codes.html">How to use paste special using VBA Codes? | VBA Codes | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/is-vba-important-for-career-in-analytics.html">Is VBA important for a career in Analytics? — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/udf-get-characters-count-from-selected.html">UDF — Get the characters count from the selected cells in Excel VBA — VBA codes</a></p><p><a href="https://www.learnitixs.com/2021/06/udf-get-sum-of-digits-of-colored-cells.html">UDF — Get the sum of numbers of colored cells only — Learn Excel VBA — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/04/vba-overview-applications-how-to-use.html">VBA : Overview, Applications &amp; How To Use — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/vba-code-to-open-save-as-dialogue-box.html">VBA Code To Open Save As Dialogue Box — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/Creating-UDFs-VBA-Codes-Customized.html">What are UDF’s in VBA? How to Write UDF function in Excel VBA? Examples of UDF’s</a></p><p><a href="https://www.learnitixs.com/2021/05/VBA-Event-Workbook-Event-Worksheet-Event-Event-Trigger.html">What are events in VBA? How do I create an event in VBA? — Explained with Examples</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea86679bff1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is With Statement and how it is used in VBA? | VBA Codes | Learnitix]]></title>
            <link>https://medium.com/@learnitix/what-is-with-statement-and-how-it-is-used-in-vba-vba-codes-learnitix-31de3d4373e2?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/31de3d4373e2</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:45:00 GMT</pubDate>
            <atom:updated>2021-07-28T17:45:00.862Z</atom:updated>
            <content:encoded><![CDATA[<p>Suppose in the data shown in the below picture, I want to change its font size, font color, make it bold and I want to fill the cells with color. So these are the object properties that I want to use on the data so we will need to write the below codes.</p><p><strong>Sub objectproperties()</strong></p><p><strong>Range(“a1”).CurrentRegion.Font.Size = 18</strong></p><p><strong>Range(“a1”).CurrentRegion.Interior.Color = vbBlue</strong></p><p><strong>Range(“a1”).CurrentRegion.Font.Bold = True</strong></p><p><strong>Range(“a1”).CurrentRegion.Font.Color = vbRed</strong></p><p><strong>End Sub</strong></p><p>The above codes will give us the output as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*7ROsFZI_KLNHJE0U.png" /></figure><p>The codes shared above you can observe a part of the code is being repeated in every line of code that is</p><p>Range(“a1”).currentregion. So if we do not want to repeat this code and just want to write the properties to be executed we can write this in this way as well.</p><p><strong>Sub With_Statement()</strong></p><p><strong>With Range(“a1”).CurrentRegion</strong></p><p><strong>.Font.Size = 18</strong></p><p><strong>.Interior.Color = vbBlue</strong></p><p><strong>.Font.Bold = True</strong></p><p><strong>.Font.Color = vbRed</strong></p><p><strong>End With</strong></p><p><strong>End Sub</strong></p><p>In the above code, the part of code that was being repeated is written with “With” and then you do not need to write the same code again and again. You just need to write the properties starting with a dot. You can write as many properties as you want and once you are done with the codes, end it with “End with” as shown above. It will give us the same output as shared without “With Statement”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*dJpySznfd2M7XqVs.png" /></figure><p>With Statement concept is a very useful concept and it will save your time and improve the efficiency of the codes.</p><p>You can use this concept when you have to write many lines of code with the same object.</p><p>I hope you understood the concept. Happy Learning!</p><p><a href="https://www.learnitixs.com/2021/05/what-is-usedrange-and-how-it-is-used.html"><strong>Previous Chapter </strong></a><strong>— </strong><a href="https://www.learnitixs.com/2021/05/how-to-copy-paste-data-from-one-place.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/05/filters-advanced%20filters-%20Microsoft%20excel.html">Applying filters and advanced filters on Data in Microsoft excel using VBA — Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/05/special-cells-VBA-deleting-blank-rows.html">Deleting blank rows from data in excel using special cells concept — Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/06/funtion-procedure-sum-of-digits-excel.html">Function Procedure — Sum of Digits — Excel VBA — Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-copy-paste-data-from-one-place.html">How to Copy Paste data from one place to another place or one worksheet to another worksheet using Excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/VBA-Formula-functions-range-Property-VBA.html">How to apply formula in excel using VBA? Formula property in VBA | Learnitix</a></p><p><a href="https://www.learnitixs.com/2021/06/Data-Compilation-Macro-Project-Explained.html">How to compile the data from multiple workbooks to one workbook using Excel VBA? — Explained</a></p><p><a href="https://www.learnitixs.com/2021/06/copy-paste-data-from-one-workbook-to-another-using-excel-vba.html">How to copy data from one workbook and paste it into another using Excel VBA?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31de3d4373e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is UsedRange and How it is used in VBA? | VBA Codes | Learnitix]]></title>
            <link>https://medium.com/@learnitix/what-is-usedrange-and-how-it-is-used-in-vba-vba-codes-learnitix-75aa2f8196cd?source=rss-deeaefe133a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/75aa2f8196cd</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Learnitix - Learn Analytics]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 17:43:28 GMT</pubDate>
            <atom:updated>2021-07-28T17:43:28.767Z</atom:updated>
            <content:encoded><![CDATA[<p>UsedRange is a range whose range starts from the first cell where data is present to the last cell where data is present in the worksheet. In the picture shown below starting range is E3 and the ending point is N11 so the used range would be E3:N11. It’s not necessary that starting point is A1 or active cell, it can be any point from where data is starting and the endpoint could be any last cell where data is present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/0*mC57_bxzUqzNTOrK.png" /></figure><p><strong>Used Range</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*NXZgwp2tIcWyDiJJ.png" /></figure><p>VBA Code to select used range</p><p><strong>Sub Usedrange()</strong></p><p><strong>Activesheet.Usedrange.Select</strong></p><p><strong>End Sub</strong></p><p>We can use the used range concept we do not know the address of the range but want to select or copy the whole data present in the worksheet. This is a very useful and very frequently used concept in VBA.</p><p><a href="https://www.learnitixs.com/2021/05/what-is-current-region-and-how-it-is.html"><strong>Previous Chapter </strong></a><strong>— </strong><a href="https://www.learnitixs.com/2021/05/what-is-with-statement-and-how-it-is.html"><strong>Next Chapter</strong></a></p><p><strong>Quick References</strong></p><p><a href="https://www.learnitixs.com/2021/06/how-to-create-charts-in-vba-explained.html">How to create charts in VBA? — Explained with Examples</a></p><p><a href="https://www.learnitixs.com/2021/05/Last-row-LR-Concept-VBA.html">How to get the Last Row of the data? The LR concept — Learn Excel VBA</a></p><p><a href="https://www.learnitixs.com/2021/06/Error-Handling-Techniques-On-error-goto-on-error-resume-next.html">How to handle errors in Excel VBA? What are the different techniques to handle errors in VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/File-dialogue-getopenfilename-workbook-property.html">How to open a workbook from the local drive in Excel VBA? GetopenfileName Property Explained</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-cells-or-group-of-cells.html">How to select cells or group of cells using cells properties in excel using excel VBA?</a></p><p><a href="https://www.learnitixs.com/2021/05/how-to-select-cellsgroup-of-cells-or.html">How to select cells/group of cells or range in excel using Excel VBA? — Learnitix</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75aa2f8196cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>