Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Help Pls Copy 1 Random Result To Many On Another Sheet?

Hi,

I need your help.

Sheet 1: Produces a random alphanumeric string in about 200 variations,
depending on strict criteria.
eg. Criteria #23 is 2 letters, 3 numbers, a letter, a number - such as MH735D9

Sheet2: Has 50,000 items. It uses data in its page to decide which string
code it should use from sheet 1.
eg. Line 16843, item fits with variation #23, vlookup sheet 1 and get unique
code.

Trouble is, because it is already calculated on sheet 1, all the thousands
of items that fit criteria #23 will get the same code from the vlookup,
rather than a unique code.
eg. from above, all items fitting criteria #23 will get the code MH735D9

How can I make it so that they all have unique codes (as per the criteria)?

Thanks in advance. :)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Help Pls Copy 1 Random Result To Many On Another Sheet?

Instead of VLOOKUP() use the below formula which will return the nth lookup
value.

To return 2nd match....(return from ColB based on match in ColA)
C1 = lookup_value
C2 = 2

=INDEX(B1:B100,SMALL(IF(A1:A100=C1,ROW(A1:A100)),C 2))

Instead of C2 you can genrate a random number between 1 and the count of the
lookup_value in ColA. between 1 and COUNTIF(A:A,C1)

Please note that this is an array formula. You create array formulas in the
same way that you create other formulas, except you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=<formula}"

If this post helps click Yes
---------------
Jacob Skaria


"narrator" wrote:

Hi,

I need your help.

Sheet 1: Produces a random alphanumeric string in about 200 variations,
depending on strict criteria.
eg. Criteria #23 is 2 letters, 3 numbers, a letter, a number - such as MH735D9

Sheet2: Has 50,000 items. It uses data in its page to decide which string
code it should use from sheet 1.
eg. Line 16843, item fits with variation #23, vlookup sheet 1 and get unique
code.

Trouble is, because it is already calculated on sheet 1, all the thousands
of items that fit criteria #23 will get the same code from the vlookup,
rather than a unique code.
eg. from above, all items fitting criteria #23 will get the code MH735D9

How can I make it so that they all have unique codes (as per the criteria)?

Thanks in advance. :)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Help Pls Copy 1 Random Result To Many On Another Sheet?

Thank you!
Now that's clever :)

"Jacob Skaria" wrote:

Instead of VLOOKUP() use the below formula which will return the nth lookup
value.

To return 2nd match....(return from ColB based on match in ColA)
C1 = lookup_value
C2 = 2

=INDEX(B1:B100,SMALL(IF(A1:A100=C1,ROW(A1:A100)),C 2))

Instead of C2 you can genrate a random number between 1 and the count of the
lookup_value in ColA. between 1 and COUNTIF(A:A,C1)

Please note that this is an array formula. You create array formulas in the
same way that you create other formulas, except you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=<formula}"

If this post helps click Yes
---------------
Jacob Skaria


"narrator" wrote:

Hi,

I need your help.

Sheet 1: Produces a random alphanumeric string in about 200 variations,
depending on strict criteria.
eg. Criteria #23 is 2 letters, 3 numbers, a letter, a number - such as MH735D9

Sheet2: Has 50,000 items. It uses data in its page to decide which string
code it should use from sheet 1.
eg. Line 16843, item fits with variation #23, vlookup sheet 1 and get unique
code.

Trouble is, because it is already calculated on sheet 1, all the thousands
of items that fit criteria #23 will get the same code from the vlookup,
rather than a unique code.
eg. from above, all items fitting criteria #23 will get the code MH735D9

How can I make it so that they all have unique codes (as per the criteria)?

Thanks in advance. :)

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
TO COPY MORE THAN INE RESULT FROM OTHER SHEET USING LOOKUP PERANISH Excel Worksheet Functions 3 November 10th 08 07:07 PM
Can I annotate a formula result in Sheet 1 in Sheet 2 by Cell Addr Rebecca Bauer Excel Worksheet Functions 2 August 27th 07 07:20 PM
How could I get a random sample from an Excel Sheet SAZFFXCTY Excel Worksheet Functions 0 March 8th 07 07:44 PM
Generate a random result... Lukerz Excel Discussion (Misc queries) 6 May 1st 06 12:01 PM
vlookup based on random result returns incorrect result rickat Excel Worksheet Functions 1 December 6th 05 01:16 PM


All times are GMT +1. The time now is 12:02 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"