Today is my kids’ (we have twins – boy & girl) 3rd birthday. As we celebrate the day, I want to take a moment away from all Excel stuff and share my experience being a dad. Grab a cup of coffee or whatever keeps you going, relax and read on.
The first shock
My first shock of being a dad arrived even before my kids were born. It was the first ultrasound scan Jo (my wife) went thru. The nurse announced,
I hear two heart-beats. Let me re-check
It would not be an understatement to say Jo and I skipped a few heart-beats hearing that! We never thought we would be blessed with twins. While we are doubly happy we also worried whether we can be good parents.
To top it, when they turned up we realized that we have one of each – Nakshatra (girl) and Nishanth entered our world on September 24th, 2009.
(Note: In India parents are not allowed to know the sex of baby before they were born, hence the surprise)

My 6 Daddy years…
A quick TODAY()-DATE(2009,9,24) tells you that it has been only 3 years since my kids were born. But I have amassed 6 daddy years, thanks to raising twins!
In these 6 years, there were a handful occasions when I felt like sending a classified ad to newspapers to this effect:
Take one or both. 2 lovely kids, well raised but naughty. Potty trained and can brush their teeth. Hurry up!
But better sense prevailed and we kept them 😀
To be honest, they are not all that mischievous. But sometimes they get on our nerves so bad.
A dinner to remember
After spending probably zillion nights eating at home, one day, my wife declared, “Honey, lets go out tonight.” We usually leave the kids with our in-laws (they live close by) when we do this. But that day we must have been possessed by cruel demons. Why else would I say, “Lets take the kids along!”
And all 4 of us got in to a car and went. We did a bit of shopping (getting new clothes for kids for their upcoming birthday) and reached the restaurant. Being weekend it was full. So I left Jo & kids at lobby and went inside to book a table.
Let me break this story at this point and give you one basic rule of parenting.
You need 100% attention of one adult per one children when they are in public places.
Coming back to the lobby, as I walked inside, suddenly Nishanth and Nakshatra felt liberated & started running like incredible hulk after breaking free from underground army prison. With in a span of 30 seconds, Nakshatra walked to a near-by mini pond and sat on the ledge. As Jo managed to lug Nishanth from the other corner to that pond, Nakshatra made a backward move with a swiftness rarely seen outside tom and jerry cartoons.
SPALSH!
She is drowned up side down and started crying aloud.
Thankfully, Jo quickly pulled her out. But now all her clothes are wet and she is shivering a lot.
Fortunately, we had new clothes in the car. So I took her to the car and changed. By the time I got back, Jo already got us seats and ordered something. So we started eating. And then, Nakshatra wanted to pee. So Jo took her to the rest-room. And then Nishanth started running behind them. So I followed him.
Meanwhile a clever waiter noticed an empty table with no food items. He promptly asked the next group to occupy it.
When all of us got back, we had 4 strangers looking hungrily at our order of chicken something, Indian breads & something else!
I will not bother you with how the rest of dinner, drive to dessert place and drive back home went. But rest assured that we had few more nasty surprises.

The car that wont start
My kids have taken a strange fancy to keys & key holes. Once every few weeks they invent a hare-brained scheme to spoil a lock, key or something. Once when visiting family friends, my son has managed to bend my car keys by 900. Fortunately they had a hammer and we could twist it back.
But we are not always so lucky. Recently, in one of their invented games, they poked small sticks in to the key hole my car. Later when I tried to open the door, it was jammed. I ended up calling the service center folks and they sent a technician who gave me the look, “Sucker! I am sure you will become a regular customer”.
This is not a one off thing. I had same experience with my bike key hole, car trunk key hole and our gate locks. And did I tell you my kids derive a lot of pleasure locking the doors when we are in bath?!?

But its not all that bad
If there is one thing I am doing more after my kids are born, it is laughing & smiling. We (Jo and I) laugh at least a dozen times everyday watching the kids. They make us immensely happy. It is a joy to watch them grow, take good care of each other and learn things. Their innocent smiles and immense curiosity put us at ease almost immediately even when we are tired, stressed or worried. And that is worth more than a jammed key hole or spoiled dinner.
I wish you many more years of happiness, health & wealth Nakshatra & Nishanth. Now go and have the cake.
Just don’t spoil your new clothes 😛
PS: If you have kids, Learn Excel. You will have more free time to chase those little lunatics.
















24 Responses
I’d suggest simply using the subtotal function and filtering the data using the Win/Loss column. You get the same results and the formula is more comprehensible.
@John
That is one option.
There are times however when you want to see the whole data table or a filtered subset and still want to produce summary reports against an unfiltered field.
Is there a particular reason why you are using a comma and the unary (–) operator for the second array in the SUMPRODUCT formula? It seems to work the same if you were to string the arrays together using the asterisk (*). The advantage is that SUMPRODUCT treats the entire string of arrays as a single array.
@Mathew
Your correct, There is no difference.
I thought it may have been easier to explain this method.
Is there a way to do this on a large set of data? As in ~100,000 rows? When I try I get an error because the formula becomes too long. It says the max length of a formula is 8,192 characters. Excel 2010.
How do I incorporate a specific text within a cell for the second array. For instance, – -(C7:C13=”Apple”)
when I chose a specific text the formula does not work.
@RB
I am not sure what is the issue as if I use the sample data in the post the following work fine
Count:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(C7:C13,ROW(C7:C13)-MIN(ROW(C7:C13)),,1)), –(C7:C13=”L”))
Sum:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(C7:C13,ROW(C7:C13)-MIN(ROW(C7:C13)),,1)),(C7:C13=”L”)*(D7:D13))
You may want to check that there are no leading or trailing spaces in your list of Apples
I should have given a better explanation. Heres my situation. I have a column with cells filled with names like Column 1, Column 2, Pier 1, Pier 2, etc. If the cell just contained Pier and searched for that it works. But because it has other characters in the cell its not recognizing the pier. So how can I extract specific characters of a string of text in this formula?
Hopefully this was a better explanation
Hello-
This formula works pretty well for me except that it slow down excel and prevents some of my macros from working. I was wondering if there was a way to program this in VBA so that excel isn’t always trying to recalculate it. I would like to use a push of a button to get it to run then paste in a cell.
Thanks!
I am trying to sum filtered data in a column, but would want to ignore the negative values in the column. How to go about doing this?
@Akshay
Why not just add a filter to that column to only show the values greater than zero?
The negative values are required for reporting purposes, but their effect on the total is distorting the required output. Please advise.
@Akshay
I’d suggest making a post in the Chandoo.org Forums
http://forum.chandoo.org/
Attach a sample file to simplify the task
I have this working for counting and summing, however, I have a list and for the second array, I need a criteria. That is, I’m looking for b13:b200=”01.??.??” or =left((a1,2) or something like that. These types of criteria matches do not appear to work as I get a blank as a result.
Thanks!
@Bob
As your formula b13:b200=”01.??.??” looks like you are trying to check the first day of the month of the range
What about trying Day(B13:B200)=1
Hai Experts,
i understood this formula well and working fine in MS Excel 2013
but when the same am trying to place in google Spreadsheet it shows error as
“SUMPRODUCT has mismatched range sizes. Expected row count: 1. column count: 1. Actual row count: 2014, column count: 1.” and as a result #VALUE! Appears in cell.
Can anyone please help me how would i get it done in Google Spread sheet
or is there any other formula as a substitute for this.
Thank you very much.
thanks for providing this.. but why does excel keeps on prompting Circular referencing in cell D3?
@Vivek
I don’t know
I just downloaded the file and it is working fine and not showing that error
Goto the Formulas, Calculation Options Tab and check that Calculation is set to Automatic
What version of Excel and Windows are you using ?
I know that this forum is for MS Excel, but I am trying to help someone who is working in Google Sheets. The below formula works in Excel but Google Sheets returns:
“SUMPRODUCT has mismatched range sizes. Expected row count: 1. column count: 1. Actual row count: 39000, column count: 1.” and as a result #VALUE! Appears in cell.
This is the same problem asked by Srichirin above. Does anyone know if there is a formula for Google Sheets that will replicate what MS Excel does?
=SUMPRODUCT(SUBTOTAL(3,OFFSET($C$6:$C$39500,ROW($C$6:$C$39500)-MIN(ROW($C$6:$C$39500)),,1)),- -($C$6:$C$39500=H1),($D$6:$D$39500))
Trying to find a SUMPRODUCT formula that counts the word Closed by date for the last 7 days in a filtered list.
=COUNTIF(M:M,”>”&TODAY()-7) works ok for unfiltered count Column M contains Closure dates (blank if open) and Column L is Status Open or Closed
@ Terry
Please ask the question at the Chandoo.org Forums
https://chandoo.org/forum/
Please attach a sample file to ensure a quicker more accurate answer
I used this formula and worked like a charm! But, now I’ve been requested to use it but adding not one but two criteria in the same formula. For instance the sum I was doing added negative and positive numbers. I’ve been asked to use the exact same formula but adding that only positive numbers were considered… any idea on how to do this?
How exactly do you do sum filtered cells when two criteria are need not just one?
Thank you so much brother literally I have been struggling since morning to get the sum of the filtered category, however, after reading your blog attentively i got my solution, so thanks a lot once again.