Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


Excel Help

Reply to topic
Bike Chat Forums Index -> Random Banter
View previous topic : View next topic  
Author Message

smegballs
World Chat Champion



Joined: 28 Oct 2007
Karma :

PostPosted: 15:21 - 17 Feb 2010    Post subject: Excel Help Reply with quote

I'm having trouble with making a letter generator in Excel.

https://i46.tinypic.com/652vex.jpg

That is the format of how I want it to read. When F9 is pressed (recalc) the letters will be randomly generated from A-Z within the bottom row. I have got this far using random number generator, conditioning the random number and using a VLOOKUP table to return a letter value.

However in my application there can only be one of each letter per row otherwise it won't work. With a simple random number there is nothing to stop the same letter being generated twice within the row. Is there an "easy" way to make a unique letter for each position or is this heading into proper algorithm territory?



Karma if you know what it is! Laughing

Some people WILL have seen this or something very similar before
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

FreshAL
Sir Crashalot



Joined: 04 Jul 2005
Karma :

PostPosted: 16:37 - 17 Feb 2010    Post subject: Reply with quote

3 columns: A B C D E
in A place 1 to in decreasing numerical order
in B place letters a-z, in alphabetical order starting with 'a' in cell B1
in C1 place "=rand()" can copy this down to C26
in D1 place "=RANK(C1,$C$1:$C$26)" and copy down to D26
in E1 place "=VLOOKUP(D1,$A$1:$B$26,2)" and copy down to E26


F9 now gives your index number in column A and your randomly sorted letter in column E
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

smegballs
World Chat Champion



Joined: 28 Oct 2007
Karma :

PostPosted: 17:03 - 17 Feb 2010    Post subject: Reply with quote

Nice one, I'm having a play now so will give this a go!

EDIT: Works a treat! What also good is I can see how its working! Haven't used excel in a while so I'm rusty.


I don't suppose you know quite how "random" the random number function is? I've heard that apparently some are not that random due to the way a computer works.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Charlie
World Chat Champion



Joined: 27 May 2007
Karma :

PostPosted: 17:40 - 17 Feb 2010    Post subject: Reply with quote

How random do you want it? A computer program will never be truly random, unless it looks thermal noise from some electronic component.

I may have remembered the bit thermal noise wrong, it was mentioned in a lecture in passing and I was tired
____________________
Past: Honda x8rs, Honda City fly, Honda Hornet 250, Honda VFR750, Yamaha xt600e.
Current: Honda CBR929RR & Yamaha XT660Z Tenere
 Back to top
View user's profile Send private message You must be logged in to rate posts

smegballs
World Chat Champion



Joined: 28 Oct 2007
Karma :

PostPosted: 17:52 - 17 Feb 2010    Post subject: Reply with quote

I just had a google and it seems most "random" numbers are made by psuedorandom generators.

I'm working on an encryption matrix *Big hint for the guessy game* so the more random the better, but I doubt it will be attacked with mega hardware so computer random should be fine for the moment.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Alexio
World Chat Champion



Joined: 27 Aug 2009
Karma :

PostPosted: 18:02 - 17 Feb 2010    Post subject: Reply with quote

Charlie wrote:
How random do you want it? A computer program will never be truly random, unless it looks thermal noise from some electronic component.

I may have remembered the bit thermal noise wrong, it was mentioned in a lecture in passing and I was tired


Computers can get pretty damn close to random if you ask me. If you give the random number algorithm a seed based on enough variable information you're good to go. That's why something simple like the current time in microseconds passed since the last actual second is given, or this with a unix timestamp as a salt etc. Something like an analogue measurement of a computer component (current fan RPM and CPU temp?) or whatever thrown in to the mix will make it all the better Thumbs Up
____________________
will never give up his CG. I look at my fuel gauge more as a progress bar than a fuel gauge.
G: With my GSXR I do often effectively use it as a scooter with a clutch in town.
ms51ves3: why does it need 500 miles? Are you teaching it how to be a piston?
 Back to top
View user's profile Send private message You must be logged in to rate posts

Charlie
World Chat Champion



Joined: 27 May 2007
Karma :

PostPosted: 18:13 - 17 Feb 2010    Post subject: Reply with quote

Not sure how Excel generates it, however a lot of programs use unix time as the starting point for the random number. So if you know the exact time a random number is created and what was used to create it, it could be possible to figure it out.

Like I say I am definitely sure how much of the stuff I am telling you is correct!

Edit:
I was still posting while the last reply was submitted. Never mind.
____________________
Past: Honda x8rs, Honda City fly, Honda Hornet 250, Honda VFR750, Yamaha xt600e.
Current: Honda CBR929RR & Yamaha XT660Z Tenere
 Back to top
View user's profile Send private message You must be logged in to rate posts

smegballs
World Chat Champion



Joined: 28 Oct 2007
Karma :

PostPosted: 18:30 - 17 Feb 2010    Post subject: Reply with quote

Well its all working nicely now, a big matrix with no repetitions or other unwanteds.

Thanks again AL.

Thumbs Up
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts
Old Thread Alert!

The last post was made 16 years, 226 days ago. Instead of replying here, would creating a new thread be more useful?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> Random Banter All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.07 Sec - Server Load: 0.64 - MySQL Queries: 13 - Page Size: 57.1 Kb