Excel AKICOLJ
Feb. 6th, 2012 09:05 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
How do I do this in Excel?
I want to enter a value in the range 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (or similar) in one cell, and then in another cell show the entry from a table that corresponds to this value.
For example, I want to enter the value 'B' in the 'Atmosphere' column and then have my spreadsheet show in the next cell that Atmosphere B is 'Corrosive'. If I had put in '5', it would show 'Thin'.
I want to enter a value in the range 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (or similar) in one cell, and then in another cell show the entry from a table that corresponds to this value.
For example, I want to enter the value 'B' in the 'Atmosphere' column and then have my spreadsheet show in the next cell that Atmosphere B is 'Corrosive'. If I had put in '5', it would show 'Thin'.
no subject
Date: 2012-02-06 09:18 pm (UTC)no subject
Date: 2012-02-06 09:29 pm (UTC)no subject
Date: 2012-02-06 09:32 pm (UTC)no subject
Date: 2012-02-06 09:34 pm (UTC)no subject
Date: 2012-02-06 11:15 pm (UTC)no subject
Date: 2012-02-06 09:32 pm (UTC)no subject
Date: 2012-02-06 09:35 pm (UTC)=VLOOKUP(D1,A1:B10,2,FALSE)
The "2" is the column of the answer, and the "FALSE" says "Don't look for an approximate match, give me an exact one".
no subject
Date: 2012-02-07 07:22 am (UTC)You can also do an HLookup, with values in A1-M1 and targets in A2-M2, but these are less common. But handy if you have lots of tables, which I know you might... ;-)
no subject
Date: 2012-02-07 09:59 am (UTC)no subject
Date: 2012-02-07 10:01 am (UTC)no subject
Date: 2012-02-06 09:47 pm (UTC)no subject
Date: 2012-02-07 06:46 am (UTC)no subject
Date: 2012-02-07 10:15 am (UTC)No, what I'm in the process of doing is designing a cargo / freight / passengers / etc available spreadsheet for Traveller. The idea being that my spreadsheet will have a tab for each world in the campaign that the PCs will visit and after that all I will need to do is enter the UWP (Universal World Profile if you recall) and the spreadsheet will work out a whole range of stuff such as:
Goods produced on that world (down to a fairly detailed level, which some of the newer supplements like this one go into): http://www.mongoosepublishing.com/rpgs/traveller/core-rulebooks-accessories/book-7-merchant-prince.html
Freight available to ship for each type of good
Cargo available to buy for each type of good, with price
Passengers available, with destination(high passage, mid passage, low passage)
Mail available to ship, with destination
Demand for each type of good, with price
Brokers
Ship maintenance facilities at starport
Fuel prices and types of fuel available
Etc.
The urge to do a spreadsheet has been brought on by my not being entirely satisfied with any of the trade systems in the many versions of Traveller. Most fall victim to the 'golden pair' fallacy (find a pair of opposite worlds right next to each other, one low tech and agricultural and one high tech and industrial and just make lots of money buying cheap food on world A and selling it at a big profit on world B where you buy cheap tools and sell them on world B, rinse and repeat). The golden pair shouldn't work in the long run (i.e. it should already have stopped) since people will realise that they can do this and will move in. That increases demand for food on A (increasing the price ceteris paribus) and increases supply of food on B (decreasing the price there ceteris paribus) and therefore squeezing the profit that our plucky free trader crew can hope to achieve.
The only Traveller trading system that doesn't fall for the golden pair fallacy is GURPS Traveller: Far Trader (possibly because that was written by an economist). However, there are other aspects of that which I don't like, hence the desire to write my own. And if I'm writing my own, I don't want to have to make hundreds of dice rolls to determine quantities and prices every time the PCs arrive at a new world. The spreadsheet should remove the dice rolls.
no subject
Date: 2012-02-07 02:25 pm (UTC)That is, the effective demand level for industrial goods of a low-tech world will be relatively low if there's a handy source of high-tech stuff? You might need some sort of relational database for that sort of thing, though.
no subject
Date: 2012-02-07 02:30 pm (UTC)no subject
Date: 2012-02-07 04:08 pm (UTC)no subject
Date: 2012-02-07 04:12 pm (UTC)