I don't know a lot in Excel but I want to add Multiple prefixes in Excel and let them loop until the number of cells ends.
I used this Formula, but it picks them randomly:
(=CHOOSE(RANDBETWEEN(1, 3),"DR. ","SM. ","FG. ")&" "&A1
Example output I want :
Input: ---------> Output:
A DR. A
B SM. B
C FG. C
D DR. D
E SM. E
F FG. F
CodePudding user response:
You may try this, using CHOOSE()
& MOD()
• Formula used in cell B1
=CHOOSE(MOD((ROW()-1),3) 1,"DR. ","SM. ","FG. ")&A1
Or, if one has access to O365 and presently in Insiders, Beta Channel Version, may try this as well, using CHOOSECOLS()
• Formula used in cell B1
=CHOOSECOLS({"DR. ","SM. ","FG. "},MOD((ROW()-1),3) 1)&A1