+ Reply to Thread
Results 1 to 4 of 4

If / Then Formula possibility?

Hybrid View

  1. #1
    Registered User
    Join Date
    10-29-2008
    Location
    Massachusetts, USA
    Posts
    2

    If / Then Formula possibility?

    Hi there everyone. I've been searching, and searching, and searching for my problem, and I really cant seem to find it anywhere until I stumbled across your awesome forums :D

    Here is my dilemma: I'm helping out a community that puts out a role playing game by making a character sheet for their gaming system. It's normally a pen-and-paper type affair, but a few people have reached out to me and asked me to make it. Now, one thing that I really thought would be nifty would be to make it persistent. I know of the Excel basics, creating basic formulas and the such, but this is where I hit a brick wall.

    For the character sheet, they normally have basic attributes on a 1-20 scale. These attributes are accomanied by a bonus. The only thing is those, while these bonuses go across a linear path (For attribute 1, it's -30, for 2 its -20, for 3 its -10, for 4 its -5 for 5 its 0....), I cant seem to figure out how to create some kind of If/Then formula for it....

    Heres my example:

    Brad makes a character that has a score of 9 for one of his attributes. The bonus given to someone with a 9 is a +10. What I'm looking to do is create a table that sees that 'If (c9)=9, Then (d9)=+10'...

    Any assistence on this would be most excellent.....

    -----------------------

    And my second related issue...

    Is there any possible way to do the above mentioned formula in relation to a drop down selection bar? It's the same thing here; To break it down simply, It would be excellent if there was a way for it to say If (a10)=Warrior, then (c10)= +10.



    I know it must seem vague, I'm just kind of lost when it comes to this, and my friends (alleged excel experts) tell me I'm out of luck and not to bother with it....

    Any help would be excellent! Thank you!
    Last edited by Envoke; 10-30-2008 at 11:04 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540
    I think you'll need to check the VLOOKUP() function in Excel- it may be the thing you need.

  3. #3
    Registered User
    Join Date
    10-27-2008
    Location
    Earth
    Posts
    3
    I would agree with deadlyduck. On a second worksheet within your workbook, set up tables with your lookup values (eg "warrior", "archer", etc) in the first column, and what you want the various bonuses to be in the next column. For example, if you have Strength, Speed and Stamina bonuses, it might be:

    Type        Str   Spd   Stm
    Warrior     4     3     5
    Archer      3     2     6
    And so on.

    Then select the entire table, and define the range name StatLookup (for example).

    Then you'd use the formula for stat bonus columns:

    =VLOOKUP(<cell of character type>,StatLookup,<StatColumn>,FALSE)
    Cell of character type means refer to whichever cell your character's type is held in. You should use dollaring (eg $A$1 instead of A1) to fix the reference to that cell when you wish to copy the formula.

    The stat column is the column in the lookup table corresponding to the stat for which you wish to find the bonus, starting at 1 for the lookup key.

  4. #4
    Registered User
    Join Date
    10-29-2008
    Location
    Massachusetts, USA
    Posts
    2
    Hmmmmm that all seems pretty simple. So in essence what I will be doing is just creating a table of these for the cell formulas to look up to? So that would be applicable to both my questions then?!

    Awesome! :D

    I will most certainly try it out as soon as possible and report back here, if anyone has anything else to contribute, please do!!



    EDIT::

    Most excellent! The formula worked, and now I have a fully functional sheet! The tables used for table_array work well for an easy reference as well. It's almost complete, and the community is in awe over it!

    :D Thank you so much everyone! Solved!

    Oh, and I made sure to change the topic title, I'm sorry about that! :X
    Last edited by Envoke; 10-30-2008 at 11:04 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1