I have been trying to work with Myrna Larson code, and I have updated

If N > Cells.Count to

If N > Cells.CountLarge

for excel 2010, I'm using this data for Combinations and Permutations -

alphabets - A-Z = 26

numbers - 0-9 = 10

and special characters . < ( + ! $ * ; - / > ? : # = ~ { } = 18
total 26+10+18 = 54

And I'm fishing for 3/4 and 5 character permutations/combinations of this, which should equal to 54*54*54 = 157,464 (for 3 character) combinations, now when I run the macro, I get the following error -

Run-time error '1004':
Application-definted or object-defined error.

And in a new excel sheet I get data adding upto 26231 Combinations if I run C in A1, or 145,962 Permutations if I run with P in A1.

I was wondering if anyone knows whats going wrong here, I have never programmed in VBA, and any help would be great.

Thanks!