formula working in some cells but not in other similar cells

Copper Contributor

I have maintained a spreadsheet that I have used once a year at tax time every year for the past 20 years.  My wife and I have had a number of health issues and therefore visit a number of doctors and clinics throughout the year.  Each year I take my appointment calendar and assign a code letter for the trip destination.  For each destination I have the round trip mileage, tolls and parking fee.  I have 3 columns A, B and C where A has the trip date, B has the value 1 and C has the trip code.  Column A is given the range name TravelDate.  Column B is given the range name TravelCounter.  Column C  is given the range name TravelCode.  I also have columns C, D, E and F starting in row 3 where C is a list of the codes, D has a description of the trip represented by the code, E has the round trip mileage for the code and F has the oop expense for the trip.  Each additional column to the right has 1/1/yyyy in row 1 and 12/31/yyyy in row 2 where yyyy is the tax year of interest.   Each remaining row then contains:                {=SUM(TravelCounter*(TravelDate>=L$1)*(TravelDate<=L$2)*(TravelCode=$C[current row]))}   L is the column for my 2022 tax year.  The formula should give me the count of the occurrences of the code in column C during the year.  A sumproduct with the count and mileage for each code gives me the total medical mileage for the year.  Similarly a sumproduct with the count and oop expense for each code gives me the total medical oop travel expense for the year.  My problem is that the formula works for prior year columns but does not work for this year's column.  I seem to recall that even though the formula looks correct there is a simple something I need to do to make it active.  As I said, I only use this file once a year and I cannot recall that needed step.  I have tried doing some Google searches but the step is probably so simple that it's not coming up.  Any help would be appreciated.  I am running Office Pro Excel 2003 in Windows 10 Pro.  Thank you for any assistance you can give.                    

3 Replies

@mcetera Thank you to all who have read my post and to those who were thinking of replying.  I have solved my issue.

@mcetera 

Thank you to all who have read my post and to those who were thinking of replying.  I have solved my issue.

 

Good. And how did you know that I (among others, I'm sure) was indeed thinking of replying?!

 

Frankly, though, my reply would have been along these lines: you should seriously consider updating to a current version of Excel. The dynamic array functions that are now available make handling a situation like yours both easier AND more readily understandable. Less of that "How did that work again? I know I understood it when I first wrote it, but...."

 

So it's good news that you resolved it on your own. That's always (in my experience) more satisfying, and a better learning experience, albeit frustrating as you go through it.

 

Have a good year!

Thank you for your reply. I actually have a subscription to Microsoft Office 365 but I prefer standalone software. In addition, there are some legacy workbooks that are not worth updating, although the short term problem with the workbook under discussion may give me second thoughts.