Excel Help Mk III

jaba

Fledgling Freddie
Joined
Dec 25, 2003
Messages
780
Hello clever peoples, thinking hats on please!
I need an Excel spreadsheet that allows the user to select from 4 drop down boxes a number of options. From these options I want a cell to be specified(via another text entry or clicking method) and the result of the options to be placed in there. The result should be the 4 options packed into a 32bit integer, so each should fit in a byte.
Is this possible in excel? can it do bitwise operations? or can anyone think of any other way of doing it?

Thanks!

Jaba
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,397
jaba said:
Hello clever peoples, thinking hats on please!
I need an Excel spreadsheet that allows the user to select from 4 drop down boxes a number of options. From these options I want a cell to be specified(via another text entry or clicking method) and the result of the options to be placed in there. The result should be the 4 options packed into a 32bit integer, so each should fit in a byte.
Is this possible in excel? can it do bitwise operations? or can anyone think of any other way of doing it?

Thanks!

Jaba

Can you elaborate a bit jaba, ie maybe give us some examples so we can see how this might fit together? Particularly, how you would envisage 'putting the 4 choices together as a 32-bit integer' ?

Thanks :)
 

~Yuckfou~

Lovely person
Joined
Dec 22, 2003
Messages
2,594
Far simpler....


pen-paper.gif




...sorry, bored and feel like shit :(
 

jaba

Fledgling Freddie
Joined
Dec 25, 2003
Messages
780
Elaborate...hmm..ok well its for a map format for a game I am writing, on each tile there are 4 possible things: what tile should be placed there, what object is on the tile, what sprite is on the tile, and an ID field for items that have actions.

The Integer is split up like this:
(MSB)------------------(LSB)
ID|SPRITE|OBJECT|TILE

The game then reads this and acts appropriately. I need a quick dirty level editor and I thought excel might be able to help me.

That any more use? hehe, thanks for quick reply Jup!

Jaba
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,397
Ok, so logically with 8 available bits, there are 2 bits available for each of the 4 pieces of information, which allows therefore only 4 possible options of each. Is this viable, ie are there only 4 or less possible values for each of the items ID, SPRITE, OBJECT and TILE?
 

jaba

Fledgling Freddie
Joined
Dec 25, 2003
Messages
780
no no, there are 32 bits, each field has a byte so 8 bits, so 255 different values that it can have.
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,397
oops, my bad :)

What do you want excel to give you, the integer value or the binary represenation of that value?
 

jaba

Fledgling Freddie
Joined
Dec 25, 2003
Messages
780
the integer value please thank you please :)
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,397
... almost done...
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,397
http://www.dippyworld.demon.co.uk/images/JABA.xls

Ok... this works by having tables of data and the 4 cells which have been set up as lists using the 'Data','Validation','Allow' set to list and assigned to the list of possible values. Note the use of names (Insert, Name,Define) to specify the different tables for a lookup of the values corresponding to each choice. The calculation needs double checking, but I'm running out of time. I think it's ok ;)

Cheers.

Edit: sorry for the delay... I got hi-jacked :(
 

jaba

Fledgling Freddie
Joined
Dec 25, 2003
Messages
780
You are my absolute hero! I owe you an awful lot of beer! thank you thank you thank you!
 

Users who are viewing this thread

Top Bottom