[QUOTE=matt_mcl]
Basically what I want to do is this: The bank gives me a sheet in which the amount for each transaction is listed in column C if it is an expenditure, and column D if it is a deposit.
What I’d like to have happen is to have the drop-down menu that you’ve described, but I’d like the menu to contain options taken from one list (such as “rent,” “groceries,” “taxes”…) if there is an amount in column C, and taken from a different list (such as “job income,” “reimbursement,” “tax refund”…) if there is an amount in column D.
[/QUOTE]
Ah! Enlightenment!
Okay. This is entirely possible, but – and here’s the rub – it can get VERY tricky to implement if you’re not comfortable in Excel.
The gist if it is, you need your drop-down menu to behave intelligently – to choose a different list to show based on some input somewhere – and it isn’t designed to do that. Excel’s Data Validation is built in such a way as to discourage that sort of behavior, actually. The good news is, you can get around it.
A different option would be to use two columns instead of one for your categories – one pulls from a list of expenditure-categories, the other from a list of deposit-categories. This is easy to implement and doesn’t require any funky formula action, but is not very streamlined and not exactly what you want.
I’m going to assume you want to use the one-column method. First things first: on your sheet somewhere (and it must be on the same sheet as your list – I can show you ways around this as well if needed, but for now go with it), create two lists, one of expenditure categories and one of deposit categories. Place them in different columns and make note of which is where – Ex. in G and Dep. in H, for example. Make sure they start at row 1.
Next, select your Category column (the entire thing). Open up the Data Validation bit, choose List, and put the cursor in the Source box. Here’s where it gets tricky: we’re going to use a function called INDIRECT(), which essentially lets you create a reference to a cell or range on-the-fly, and Excel will treat it just like you’d typed it in directly.
Here’s the formula, using the columns I’ve described above (change if necessary):
=INDIRECT(IF(C1<>0,“G1:G”&COUNTA(G:G),“H1:H”&COUNTA(H:H)))
So, in English, what this is doing is:
IF the value in C1 is different than 0, then use G1 to G-however many Expenditure categories I have as the range, otherwise, use H1 to H-however many Deposit categories I have as the range.
Note that Excel will automatically change C1 to C2, C3, C4 … and so on as needed for the entire column. Also note that adding Expenditures or Deposits is easy – just tack them on the end and they’ll start appearing in the list.
Final warning: make sure you type the formula EXACTLY as it appears. If you need to change it to fit your sheet, do so in Notepad or somewhere else first, then copy-paste it into the Source box in Excel, because otherwise you’ll have a heck of a time trying to fix things (arrow keys behave differently when typing in that box, as just one example of problems).
Make sense?