Answer the question
In order to leave comments, you need to log in
How to correctly write a function in an EXCEL cell so that a certain row of a sequence of numbers appears?
What function should I enter in the EXCEL cell so that by dragging the cell and with this function I get numbers (a series of numbers) 333333322222222111111111 (each digit is in a separate cell). No matter how far I pull, it is important that there are 33% of digits 3, 33% of digits 2, 33% of digits 1. USE ONLY FUNCTIONS., You cannot use global excel settings.
Answer the question
In order to leave comments, you need to log in
In fact, we need to find out the size of the entire range and the place of the current cell in it. The main problem is to avoid circular references.
For example, using COUNTA() you can determine how many cells are filled on the left. Or right. But it’s impossible to use both in one formula, because there are circular references.
The position of the current cell can also be determined using COLUMN() and subtract the fixed offset. This is a small hack, maybe better.
What follows is simple arithmetic. We get the distribution in the range 0-1, multiply by 3, round.
For example, for the starting cell C4:
=CEILING((COUNTA(D4:$XFD4) + 1) / (COUNTA(D4:$XFD4) + COLUMN() - 2) * 3; 1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question