Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Combination Numbers between 000 and 999

Hello All,
I am using Office XP and searched the NG but could not find a suitable post.
I wish to have a macro which would generate all the possible comibination
between 000 and 999.
eg.
000
001
010
100
...
111
101
110
011
....
I hope I am clear
Can this be achieved.
TIA
Rashid


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combination Numbers between 000 and 999

In A1, put in 0
in A2 put in 1
select A1:A2 and do format=Cells=Number Tab, select custom and put in 000

now select A1:A2 and drag fill down to row 999

if you want text values: then after doing the above

in B1 put in

=Text(A1,"000")
then drag fill down to row 999
Select column B and do Edit=Copy, then Edit=Paste special and select
Values.

then you can delete column A.


--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Hello All,
I am using Office XP and searched the NG but could not find a suitable

post.
I wish to have a macro which would generate all the possible comibination
between 000 and 999.
eg.
000
001
010
100
..
111
101
110
011
...
I hope I am clear
Can this be achieved.
TIA
Rashid




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Combination Numbers between 000 and 999

Hi Tom
As always u were quick in replying... But pardon me if I have not made
myself clear. I do not wish to have 001, 002... upto 999.. but I want to
have a combination of all the possiblities between 000 and 999
Hope I am clear now
Rashid
"Tom Ogilvy" wrote in message
...
In A1, put in 0
in A2 put in 1
select A1:A2 and do format=Cells=Number Tab, select custom and put in

000

now select A1:A2 and drag fill down to row 999

if you want text values: then after doing the above

in B1 put in

=Text(A1,"000")
then drag fill down to row 999
Select column B and do Edit=Copy, then Edit=Paste special and select
Values.

then you can delete column A.


--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Hello All,
I am using Office XP and searched the NG but could not find a suitable

post.
I wish to have a macro which would generate all the possible

comibination
between 000 and 999.
eg.
000
001
010
100
..
111
101
110
011
...
I hope I am clear
Can this be achieved.
TIA
Rashid






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combination Numbers between 000 and 999

Uhhh??? Tom's answer DOES give you all combinations between 000 and 999.


Show us what combination of numbers is not there?

Or it that you just don't want them ordered?


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Combination Numbers between 000 and 999

Rashid

000 through 999 would be 1000 3-digit numbers.

Possible 3 number combinations would equal 166167000

Possible 3 number permutations would equal 997002000

I would imagine it could be done, but would take some doing.

Myrna Larson has written code. Search google by author and subject
"combinations"

Gord Dibben Excel MVP

On Wed, 25 Aug 2004 01:31:47 +0530, "Rashid Khan"
wrote:

Hi Tom
As always u were quick in replying... But pardon me if I have not made
myself clear. I do not wish to have 001, 002... upto 999.. but I want to
have a combination of all the possiblities between 000 and 999
Hope I am clear now
Rashid
"Tom Ogilvy" wrote in message
...
In A1, put in 0
in A2 put in 1
select A1:A2 and do format=Cells=Number Tab, select custom and put in

000

now select A1:A2 and drag fill down to row 999

if you want text values: then after doing the above

in B1 put in

=Text(A1,"000")
then drag fill down to row 999
Select column B and do Edit=Copy, then Edit=Paste special and select
Values.

then you can delete column A.


--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Hello All,
I am using Office XP and searched the NG but could not find a suitable

post.
I wish to have a macro which would generate all the possible

comibination
between 000 and 999.
eg.
000
001
010
100
..
111
101
110
011
...
I hope I am clear
Can this be achieved.
TIA
Rashid








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Combination Numbers between 000 and 999

Wow, did I miss it or what!! <g

Gord

On Tue, 24 Aug 2004 14:54:15 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

Rashid

000 through 999 would be 1000 3-digit numbers.

Possible 3 number combinations would equal 166167000

Possible 3 number permutations would equal 997002000

I would imagine it could be done, but would take some doing.

Myrna Larson has written code. Search google by author and subject
"combinations"

Gord Dibben Excel MVP

On Wed, 25 Aug 2004 01:31:47 +0530, "Rashid Khan"
wrote:

Hi Tom
As always u were quick in replying... But pardon me if I have not made
myself clear. I do not wish to have 001, 002... upto 999.. but I want to
have a combination of all the possiblities between 000 and 999
Hope I am clear now
Rashid
"Tom Ogilvy" wrote in message
...
In A1, put in 0
in A2 put in 1
select A1:A2 and do format=Cells=Number Tab, select custom and put in

000

now select A1:A2 and drag fill down to row 999

if you want text values: then after doing the above

in B1 put in

=Text(A1,"000")
then drag fill down to row 999
Select column B and do Edit=Copy, then Edit=Paste special and select
Values.

then you can delete column A.


--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Hello All,
I am using Office XP and searched the NG but could not find a suitable
post.
I wish to have a macro which would generate all the possible

comibination
between 000 and 999.
eg.
000
001
010
100
..
111
101
110
011
...
I hope I am clear
Can this be achieved.
TIA
Rashid






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Combination Numbers between 000 and 999

Thanks all.
I would have a look at Myrna Larson posting and come back if there is any
problem
Thanks once again to all.
Rashid
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Wow, did I miss it or what!! <g

Gord

On Tue, 24 Aug 2004 14:54:15 -0700, Gord Dibben <gorddibbATshawDOTca

wrote:

Rashid

000 through 999 would be 1000 3-digit numbers.

Possible 3 number combinations would equal 166167000

Possible 3 number permutations would equal 997002000

I would imagine it could be done, but would take some doing.

Myrna Larson has written code. Search google by author and subject
"combinations"

Gord Dibben Excel MVP

On Wed, 25 Aug 2004 01:31:47 +0530, "Rashid Khan"
wrote:

Hi Tom
As always u were quick in replying... But pardon me if I have not made
myself clear. I do not wish to have 001, 002... upto 999.. but I want to
have a combination of all the possiblities between 000 and 999
Hope I am clear now
Rashid
"Tom Ogilvy" wrote in message
...
In A1, put in 0
in A2 put in 1
select A1:A2 and do format=Cells=Number Tab, select custom and put

in
000

now select A1:A2 and drag fill down to row 999

if you want text values: then after doing the above

in B1 put in

=Text(A1,"000")
then drag fill down to row 999
Select column B and do Edit=Copy, then Edit=Paste special and select
Values.

then you can delete column A.


--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Hello All,
I am using Office XP and searched the NG but could not find a

suitable
post.
I wish to have a macro which would generate all the possible
comibination
between 000 and 999.
eg.
000
001
010
100
..
111
101
110
011
...
I hope I am clear
Can this be achieved.
TIA
Rashid








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combination Numbers between 000 and 999

Myrna's algorithm only uses each digit once in any result set, so it won't
produce any of these:

000
001
010
100
...
111
101
110
011

Just for you edification:
I tricked it by entering each digit 3 times. Then ran permutations and
deleted all the duplicates. The end result was counting from 0 to 999

Perhaps you haven't clearly articulated what you are looking for???

--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Thanks all.
I would have a look at Myrna Larson posting and come back if there is any
problem
Thanks once again to all.
Rashid
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Wow, did I miss it or what!! <g

Gord

On Tue, 24 Aug 2004 14:54:15 -0700, Gord Dibben <gorddibbATshawDOTca

wrote:

Rashid

000 through 999 would be 1000 3-digit numbers.

Possible 3 number combinations would equal 166167000

Possible 3 number permutations would equal 997002000

I would imagine it could be done, but would take some doing.

Myrna Larson has written code. Search google by author and subject
"combinations"

Gord Dibben Excel MVP

On Wed, 25 Aug 2004 01:31:47 +0530, "Rashid Khan"


wrote:

Hi Tom
As always u were quick in replying... But pardon me if I have not made
myself clear. I do not wish to have 001, 002... upto 999.. but I want

to
have a combination of all the possiblities between 000 and 999
Hope I am clear now
Rashid
"Tom Ogilvy" wrote in message
...
In A1, put in 0
in A2 put in 1
select A1:A2 and do format=Cells=Number Tab, select custom and put

in
000

now select A1:A2 and drag fill down to row 999

if you want text values: then after doing the above

in B1 put in

=Text(A1,"000")
then drag fill down to row 999
Select column B and do Edit=Copy, then Edit=Paste special and

select
Values.

then you can delete column A.


--
Regards,
Tom Ogilvy

"Rashid Khan" wrote in message
...
Hello All,
I am using Office XP and searched the NG but could not find a

suitable
post.
I wish to have a macro which would generate all the possible
comibination
between 000 and 999.
eg.
000
001
010
100
..
111
101
110
011
...
I hope I am clear
Can this be achieved.
TIA
Rashid










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combination of given numbers Rendar Excel Discussion (Misc queries) 6 April 30th 08 03:23 AM
How do i zero pad when using combination of text and numbers? kiran cherukumilli New Users to Excel 1 October 5th 06 03:41 PM
combination of numbers dc Excel Discussion (Misc queries) 0 June 8th 06 07:53 PM
combination of numbers in lottery knoertje[_6_] Excel Programming 32 October 12th 04 07:05 PM
combination of numbers kaon[_42_] Excel Programming 11 September 19th 04 06:11 PM


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"