Help with permutations

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have 6 numbers and a letter (1, 2, 3, 4, 5, 6, X) that I need to list in every possible 4 digit combination that includes duplicates (i.e. 1111). Is this possible to do in Excel instead of having to manually type every one? I have seen a couple things online but it deals with Macro's, which I know nothing about. If that's the only way can someone help me learn how?
Regards,
Nanaia

"Do or do not, there is no try"~Yoda
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi, welcome to the board.

Here's one non-VBA method.

Took me about 5 minutes.

In cell A2, enter the value 1111, AS TEXT.
In cell A3, enter the value 1112, AS TEXT.

Select the range A2:A3, and then use Excel's Drag and Fill feature to fill the range down to about row 9000.

You should now have the range A2:A9000 filled with numbers from 1111 to a little over 10,000, though they should all really be TEXT STRINGS.

Then, use Edit, Find and Replace to Find all instances of the digit "7", and replace with "X".

Then, apply a data filter, to filter all values containing the character "8", and delete them.
Repeat for the character "9".
Repeat for character "0".

And that should be it.
 
Upvote 0
Works for me! Saves my wrist from typing. Thanks!

Nanaia
"Do or do not, there is no try"~Yoda
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top