At least, I believe you can only do what I'm looking to do with macros. If they can be done with formulas, let me know. I'm already quite well versed on that side of things.
Basically, I'm making a big character sheet for D&D, and I want things to populate automatically. There are a few issues I'm running into on the programming side of things with that. The other 90% of the work is a lot of data entry for items, stats, classes, races, etc. Here are the problems I'm running into.
- Create an auto-calculating cell
One of the things I want to do is have a self-updating cell. This cell would start with the value of a number in a different cell in the sheet (say, for this example, 70). When you select the cell, and enter "-10", followed by a carriage return, the cell would automatically calculate your new entry against the existing number, and display the result of 60. I don't want to have numbers have to be entered or displayed in any cells other than the singular cell I'm trying to modify.
- Edit a cell based on the contents of another cell
Based on the nature of this project, there's a lot of "If RACE is HUMAN, add 2 to X and X and X and X and X and X and give POWER and give ABILITY". This would be looking against about 10 values of "race" at a minimum. More for "class", and even more for "armor". Realistically, I don't want to have to modify my number crunching cells from looking like this:
=IF(G6="X", (C4+5+a!B1), (C4+a!B1))
To looking like this
=IF(G6="X", (C4+5+a!B1), (C4+a!B1)+(IF OR(M3="Tiefling", "Dwarf", "Eladrin", "Human", "Squid"), +2, 0)+(IF I22="Strength", J22, 0)+IF(etc, etc, etc, etc, etc...))
With the number of different IF statements to use approaching the hundreds, just based on the number of things that could theoretically affect a "strength" score.
What I'd ideally like to do is put a macro out there that works like this logically.
IF (Sheet1!M3="Tiefling")
{
Sheet1!G8=Sheet1!G8+Racial!B2
Sheet1!X12=Feats!A17
}
etc, etc. This would make my life a lot easier. That way rather than everything checking one cell for very, very specific conditions, and making my formulas 100% unreadable in the event they make a change to an existing rule, this would just check the cell itself, and make edits to any cells that matter based on that race.
Thanks for the input guys, any is appreciated!
-Jade
Bookmarks