Tue 16 Jan 2018

## Solution - Challenge 68 - Generate a Particular Sequence

By |Tuesday, January 16th, 2018|Categories: Solutions||0 Comments

Below is a possible solution to the problem Challenge 67 - Generate a Particular Sequence -

This consists of 2 logic.

1. Generate Triangular number. The formula for which is n*(n+1)/2
2. Generate Column Labels (A, B, AA, ZZ....) from numbers, the formula for which is

=SUBSTITUTE(ADDRESS(1,3,4),1,"") where 3 is for column C. So, we need to vary this 3.

The combined formula would be -

Sat 16 Dec 2017

## Challenge 68 - Generate a Particular Sequence

By |Saturday, December 16th, 2017|Categories: Challenges||1 Comment

Study the sequence below and you need to write a formula which when dragged down should generate the below sequence.

For visual representation purpose, the sequence is in 5 columns but you need to generate the sequence in one column only.

You need to generate upto 100 entries.

The solution to this challenge will be published after a month i.e. on 16-Jan-18.

Sat 05 Mar 2016

## Tips & Tricks 131 - Repeat a Number and Increment and Repeat....

By |Saturday, March 05th, 2016|Categories: Tips and Tricks||1 Comment

Suppose, you have been given the task of repeating a number and increment that number and repeat it. For example -

1,1,1,1,2,2,2,2,3,3,3,3.....(Here, we are repeating it 4 times and incrementing and repeating 4 times again and so on)

Then you can use following formula

=ROUNDUP(ROWS(\$1:1)/4,0)

Suppose, you want to start the number with 5 not 1, then you can use below formula -

=ROUNDUP(ROWS(\$1:1)/4,0)+4

Hence, general structure of the formula is

=ROUNDUP(ROWS(\$1:1)/X,0)+Y-1

X - Number of times a particular number is repeated
Y - Starting Numbers

Hence, if you want to start with number 7 and you want to repeat it 5 times, then following formula should be used

=ROUNDUP(ROWS(\$1:1)/5,0)+6

Sat 20 Feb 2016

## Tips & Tricks 130 - Generate Sequential Numbers and Repeat them

By |Saturday, February 20th, 2016|Categories: Tips and Tricks||0 Comments

Suppose, you have been given the task to generate a sequence of numbers and repeat them. For example -

1,2,3,4,1,2,3,4,1,2,3,4

You can use the below formula and drag down -

=MOD(ROWS(\$1:1)-1,4)+1

Replace 4 with with any other number to generate any other sequence. Hence, if you want to generate 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10 then formula becomes -

=MOD(ROWS(\$1:1)-1,10)+1

The structure of the formula is

=MOD(ROWS(\$1:1)-1,X)+Y

X - Number of numbers
Y - Starting Number

Utilizing above formula, you want to generate the sequence 5,6,7,8,9,10,5,6,7,8,9,10,5,6,7,8,9,10, then use below formula (You need 6 numbers and stating number is 5)

=MOD(ROWS(\$1:1)-1,6)+5

Sat 05 Sep 2015

## Tips & Tricks 107 - Autofill on a Filtered List

By |Saturday, September 05th, 2015|Categories: Tips and Tricks||0 Comments

Everybody is quite aware about Autofill. There are various ways to Autofill. Refer to following article for Autofill -

Article 7 – Generate a Sequence of Numbers

Now, apply a filter on your range and all the techniques fail. If you drag, all cells are filled with 1 and no other techniques also work. The reason is that Autofill works only on a contiguous range. Once, you apply filter, the range becomes non-contiguous.

Now, here comes the trick -

1. Apply the filter.
2. Let's assume that first row is 3 and you wanted to fill it in column B.
3. Put following formula in B3 and drag down
=COUNTIF(\$B\$1:B2,"<>"&"")

If you don't want to drag down -
3.1 Put the above formula in B3.
3.2 Select all the cells including B3.
3.2 Press F2
3.3 CTRL+Enter

Above steps will fill the filtered list with 1, 2, 3.....