# Loop

## A collection of 9 posts

The kth term, Tk, of a certain mathematical series is defined by the following formula: Tk = k2 + 6k + 1 9k + 7 The first term, T1, of the series is obtained by substituting k
24 October 2020
Although not used very often on this site, you might find yourself in a situation where you want to use the Do Until Loop in Excel VBA. Code placed between Do Until and
23 October 2020
Below we will look at a program in Excel VBA that creates a pattern. Situation: Place a command button on your worksheet and add the following code lines: 1. First, we declare two
23 October 2020
Below we will look at a program in Excel VBA that solves a small instance of a knapsack problem. Definition: Given a set of items, each with a weight and a value, determine
21 October 2020
Below we will look at a program in Excel VBA that loops through the entire first column and colors all values that are lower than a certain value. Place a command button on
19 October 2020
Below we will look at a program that loops through a defined range. For example, when we want to square the numbers in Range(“A1:A3”). Did you know you can
19 October 2020
Below we will look at a program in Excel VBA that randomly sorts data (in this example randomly sorts names). Situation: 1. First, we declare four variables. One variable of type String we
18 October 2020
Below we will look at a program in Excel VBA that sorts numbers. Situation: Place a command button on your worksheet and add the following code lines: First, we declare three variables of
17 October 2020
Below we will look at a program in Excel VBA that removes duplicates. Situation: In column A we have 10 numbers. We want to remove the duplicates from these numbers and place the
17 October 2020