Voici's Voices
Voici's Voices

Reputation: 13

How to implement such a formula in Excel?

Example

In my example above I have the following:

  1. Column A: Products (never duplicated) - you can see listed 5 elements (the products can vary in number - I would like a formula to work for a general case of numbers);

  2. B1: always a constant;

  3. Column E: The products from column A, listed below each other, their appearance multiplied by B1, i.e. 3 times "Cereal", 3 times "Milk" etc. one after another.

My question is as follows: How can I automate (using only formulas) column E? (so if I were to change column A and B1, E then gets updated with the new values)

Upvotes: 1

Views: 104

Answers (1)

basic
basic

Reputation: 11968

You can use INDEX function:

=INDEX(A:A,ROUNDUP(ROW(A1)/$B$1,0))

enter image description here

Upvotes: 2

Related Questions