Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there some sort of mechanism in Excel that lets you create data using a specific pattern? Something like a regex that does all the possibilities.

For example:

NET[0:31]_[P/N]

Would generate

NET0_P
NET0_N
NET1_P
NET1_N

and so forth.

share|improve this question
1  
@Excellll's answer will work fine, but will change values if the rows are re-sorted, added or otherwise modified. If you want something more flexible and where values become "locked", let us know and we can work on something a little more complex. –  dav Aug 6 '12 at 19:34

1 Answer 1

up vote 2 down vote accepted

As far as I know, there's nothing built in specifically for this purpose. You can, however, get clever and use a formula to generate all the possibilities. In A1, enter the following and fill down (to A64):

="NET"&INT((ROW()-1)/2)&"_"&IF(ISEVEN(ROW()),"N","P")
share|improve this answer
2  
note that if you need it to start in a different place, the easiest way is to put this formula in a separate spreadsheet, then copy the values instead of the formulas –  Sean Cheshire Aug 6 '12 at 21:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.