If we want to vlookup something in excel it should be in left to write order otherwise vlookup will not work. To avoid this excel has introduce xlookup function which is not dependent on order.It is use to overcome limitation of both vlookup and hlookup function of order.
How to Repeat values nth times using Xlookup in Excel
If we have some value and we want it to repeat number of times for instance 10 times, 7 times ,99 times etc. we can do this by following given steps in excel.
- First write values in one column and no of times you want to repeat in another column a shown below
Â
Values to repeat | Repeat no of times |
---|---|
X | 5 |
Y | 4 |
z | 3 |
We have to repeat X,Y,X five,four and three times respectively.
- Now we have to write 1 in front of x in another column and simply add values present in repeat no of times column to it as shown in image 2 below.
- Then we have to use sequence function in excel.It will return sequence of numbers.
- At last we have to use xlookup function as shown below.All values in column A will be repeated as per values in column B.