India Salary tax computation in excel vba

Below we will look at a program in Excel VBA that calculates the tax on an income. The following tax rates apply to individuals who are residents of India.   Download the Indian Salary tax computation in excel vba. Tax Computation & CTC Structure 2015-16     Code in open sheet Private Sub Workbook_Open() Application.ScreenUpdating = False … Read more

Categories Uncategorized

Inner and Outer Loops , Exiting a Loop , Exit Do

Inner and Outer Loops Any type of Loop can have more than one level. This is very similar to Nesting Worksheet formulas on a Worksheet. There is no limit (except memory) of the level to which you can Nest loops. To keep things simple though we will only look at a two level Loop. Let’s … Read more

Categories Uncategorized

For Each loop

For Each This Loop is slightly different from the others, but only in the fact that it requires an Object as the Variable. What it does is simply Loop though each single Object in a Collection of Objects.   Sub My_ForEach() Dim rMyCell As Range Dim iMyNumber As Integer For Each rMyCell In Range(“A1:A100”) iMyNumber … Read more

Categories Uncategorized

For Loop

  The For Loop is perhaps the most useful of all the Loops. It runs a line or lines of code a set amount of times in any increment we set. The default increment is one. As you can see from below you must use a Variable of the Numeric type to set the amount … Read more

Categories Uncategorized

Do Loop Parts

  Term Definition Do Required. Starts the definition of the Do loop. While Required unless Until is used. Repeat the loop until condition is False. Until Required unless While is used. Repeat the loop until condition is True. condition Optional. Boolean expression. If condition is Nothing, Visual Basic treats it as False. statements Optional. One … Read more

Categories Uncategorized

Do Until

Again this is very similar to the Do While Loop we just used above in that it will check the condition BEFORE it enters the Loop. If the Value of iMyNumber is 0 (zero) when it reaches the Loop, the difference is the Do While would keep adding the number one to iMyNumber until it … Read more

Categories Uncategorized

Do While

This is very similar to ours Do Loop we just used above. The only difference is, instead of the condition we set (iMyNumber < 1000) being checked AFTER the Do has run at least once, the Do While will check the condition BEFORE it runs. Let’s say our Variable iMyNumber has already had the Value … Read more

Categories Uncategorized

Use of Loops

Looping is one of the most powerful programming techniques. A loop in Excel VBA enables you to loop through a range of cells with just a few codes lines.   Let’s look at each one in turn and use them in a simple way.   Do Loop   START:  Do (tell our Loop) STOP: Do … Read more

Categories Uncategorized