I have two columns A and B like below
column A contains 1,2,3,4,5 and B contains a,b,c,d,e
I want in column C like 1a,1b,1c,1d,1e,2a,2b,2c,2d,2e,3a,3b and so on.
Try this formula.
=CONCATENATE((INDIRECT("A"&ROUNDUP(ROW()/5,0))),(INDIRECT("B"& IF((ROW()-(ROUNDDOWN(ROW()/5,0)*5))=0,5,(ROW()-(ROUNDDOWN(ROW()/5,0)*5))))))
Output
Answer:
I don’t really understand what you meant by 2a,2b,2c and so on but if all you wanted to do is join what is in column A with what is in column B, this should work:
=CONCATENATE((INDIRECT(“A”&ROW())),(INDIRECT(“B”&ROW())))
That will give you 1a for C1, 2b for C2 and so on. If you wanted an iterative combination of the first cell in the first column and ALL the other cells from the second column you’d have to throw a loop together with the active/used cells from the second column as the loop end point, and change ROW()+N in the second INDIRECT function call. Then, string that together because now it would be a long text string.
Tags: excelexcel