Percent Change in a List of States

Rosstamon

Board Regular
Joined
Sep 12, 2007
Messages
77
Hello,
I am keeping a running chart on Covid 19 cases per state in the US and its territories. I want to calculate percent change for each state, but on my spreadsheet the new data won't necessarily always be the same number of rows away from the previous data. In the image you can see that New York is on line 7, 71, 136 etc. so they are not always the same number of rows away from the previous row. I'm wondering if there is a formula that will say, in column C, find the previous instance of this states name (in this case New York) and do the calculation. I assume this will be some sort of array with a calculation, but can't quite figure it out.
 

Attachments

  • Screen Shot 2020-10-03 at 8.28.20 AM.jpg
    Screen Shot 2020-10-03 at 8.28.20 AM.jpg
    108.7 KB · Views: 6

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
This might help. Note it is an official Excel Table that uses structured references.

MrExcel posts18.xlsx
CDEFG
6Date reportedAHS ZoneCountCh per Zone%Ch per Zone
73/6/2020Calgary11 
83/9/2020Calgary32200%
93/9/2020Edmonton33 
103/10/2020Calgary63100%
113/10/2020Edmonton300%
123/11/2020Calgary600%
133/11/2020Central11 
143/11/2020Edmonton1-2-67%
153/12/2020Calgary2-4-67%
163/13/2020Calgary75250%
173/13/2020Edmonton100%
183/14/2020Calgary13686%
193/14/2020Edmonton65500%
203/15/2020Calgary8-5-38%
213/15/2020Edmonton1-5-83%
223/16/2020Calgary168100%
233/16/2020Central100%
243/16/2020Edmonton76600%
253/16/2020North22 
263/16/2020South11 
273/17/2020Calgary1-15-94%
283/17/2020Central100%
293/17/2020Edmonton8114%
303/17/2020North1-1-50%
313/18/2020Calgary24232300%
323/18/2020Edmonton4-4-50%
333/18/2020North100%
343/18/2020South32200%
Sheet1 (2)
Cell Formulas
RangeFormula
F7:F34F7=[@Count]-SUM((MAXIFS([Date reported],[Date reported],"<"&[@[Date reported]],[AHS Zone],[@[AHS Zone]])&[@[AHS Zone]]=[Date reported]&[AHS Zone])*[Count])
G7:G34G7=IFERROR([@Count]/SUM((MAXIFS([Date reported],[Date reported],"<"&[@[Date reported]],[AHS Zone],[@[AHS Zone]])&[@[AHS Zone]]=[Date reported]&[AHS Zone])*[Count])-1,"")
 
Upvote 0
Holy SMOKES! Thanks, I'll have to absorb what this is doing for a while before I attempt to apply it. I appreciate your response.
 
Upvote 0

Forum statistics

Threads
1,215,730
Messages
6,126,529
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top