Dynamic Percent Change Formula

alhamdan19995

New Member
Joined
Feb 7, 2022
Messages
2
Hi All,

I am looking for some help with a dynamic percentage change formula. I have quarterly data of purchase price per unit (2019 - 2021) for each product. Some products were not purchased each quarter so I need a formula that would use the most recent purchase in those instances(i.e. purchased in Q1-19 and Q3-19, so calculate the change between those). See example below, what would the most efficient formula that would calculate the change from Q2-20 to Q4-19 for Product A and Q4-20 to Q1-20 for product B?

Purchases per quarter.

Q1-19Q2-19Q3-19Q4-19Q1-20Q2-20Q3-20Q4-20
Product A453252
Product B3452

Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Welcome to the Forum!

Is this of any use?

ABCDEFGHIJKL
1
2Q1-19Q2-19Q3-19Q4-19Q1-20Q2-20Q3-20Q4-20Q4-20Most recent
3Product A453252-60%-60%
4Product B3452-60%-60%
5Product C1011n/a+10%
6Product D3n/an/a
7Product E612n/a+100%
Sheet1
Cell Formulas
RangeFormula
K3:K7K3=IF(OR(I3="",COUNT(B3:H3)=0),"n/a",IFERROR(I3/INDEX(B3:H3,MAX(IF(B3:H3<>"",COLUMN(B3:H3)-COLUMN(B3)+1)))-1,"n/a"))
L3:L7L3=IF(COUNT(B3:I3)<2,"n/a",INDEX(B3:I3,MAX(IF(B3:I3<>"",COLUMN(B3:I3)-COLUMN(B3)+1)))/INDEX(B3:I3,LARGE(IF(B3:I3<>"",COLUMN(B3:I3)-COLUMN(B3)+1),2))-1)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks for the help, I tried using your formula but it didn't work. I even tried recreating the table you have to see if it would work there, but for whatever reason it didn't.

See attached an excerpt of the data I have, and sorry if I didn't clarify it better. So I need to calculate the change quarter over quarter for the 2019 - 2021 period for each product and for ones where there were no purchases in the previous quarter, i want to calculate the change against the most recent purchase, if any. For example, for product C, i want the change in price for Q4-19 to be calculated against Q-19 given that there were no purchases in Q2-19 and Q3-19.

Thanks again for the help.
 

Attachments

  • Average.PNG
    Average.PNG
    72.9 KB · Views: 18
Upvote 0
I tried using your formula but it didn't work. I even tried recreating the table you have to see if it would work there, but for whatever reason it didn't.
It's not clear what you mean by "didn't work"? I know it's not the solution you're looking for, but it should be something we can adapt.

You don't need to recreate the table. Click where indicated below and you can paste into cell A1 of a blank worksheet. But I think you'll need to array-enter the formulae unless you're using Excel 365. Can you replicate my results if you do this?


1644358830335.png


It's still not totally clear what results you're looking for. Can you please use XL2BB (which you can download and install here: XL2BB - Excel Range to BBCode) to post some sample data and expected results?

It will also be helpful if you can update your Account details to let us know which Excel version you are using (you'll see from my signature that I'm using 365), as the best solution may vary depending on your version.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,707
Members
448,981
Latest member
recon11bucks

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