SUMIFS to iterate through a table and only sum totals if one of the cells in a row are empty?
I have a Numbers spreadsheet that I use to track my stock trading. I have multiple accounts. My main table ("My Portfolio" in the Portfolio screenshot below) shows the usual trading info:
Since my accounts are listed only as "numbers" and selected from a popup menu, I have a second smaller table (Account Values below) that ties the account numbers to a more readable account name and I'm now adding a column to sum up the current market value of the stocks in each account. I plan to cross-reference these calculated values to my broker accounts to verify there are no errors. Populating the "Current Value" field is where I'm stuck.
The goal is to sum the market value of the various stocks (My Portfolio::Value column) in each account (My Portfolio::Account, number 230 in example above). At the same time, I also want to iterate through the Sell Date column to exclude those rows which already have data in them; this will exclude stocks from Current Value calculations that I've already sold since they will include a Sell Date. I want to then populate the Current Value field for each account in the Account Values table. When working properly, the formula's result should (closely) mirror what I see from my broker website.
Here is the formula I'm currently using in the Current Value field for account 230:
SUMIFS(My Portfolio::Value,My Portfolio::Account,230,My Portfolio::Sell Date,,)
As you can see, the final condition to check if I've sold the stock (Sell Date) is currently empty. I can't figure a way to write the condition such that it doesn't generate an error. How do I iterate through the Sell Date column to only sum those rows that have no data in the Sell Date cell? I've looked at ISBLANK but it's not useable because it only evaluates a single cell; I can't specify a range of cells to check because the number of stocks I'm holding and the number I've already sold are always changing.
Surely there is a guru out there who can help me? Thanks so much for any input you can share.
Kevin