Need help with excel prediction dragging for a repetitive formula

GiovanniSegar

New Member
Joined
Aug 14, 2017
Messages
2
When you put in a series of numbers in sequential cells then drag from the corner of the cell, Excel will see the pattern and predict the next few numbers for you.

But in more complex cases, Excel completely misses the pattern. For example, this formula:

=GETPIVOTDATA("Sum of NetSpentFirst30Days",$A$3,"AccountCreationDate",1,"Years",2016)/GETPIVOTDATA("Count of UserID",$A$3,"AccountCreationDate",1,"Years",2016)

I want to increase the 1 to a 2, then a 3, etc in sequential cells. Right now, I need to manually change both 1's for every cell. Is there a better way to do this? The only thought I have is that I could piece together the formula with a concatenate formula, but that would take a while to figure out with all the quotes I'd have to escape to make it work.

Any ideas for complex pattern prediction? Is there an excel function I'm missing that lets me tell excel which number to increment?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Use ROW() or COLUMN() functions to do the counting.

One way to do it, meant for copying down the column:

=GETPIVOTDATA("Sum of NetSpentFirst30Days",$A$3,"AccountCreationDate",ROW(A1),"Years",2016)/GETPIVOTDATA("Count of UserID",$A$3,"AccountCreationDate",ROW(A1),"Years",2016)

You can use other variations for counting (depending on where your column of formulas start): ROW(1:1), ROW()-1, ROW()-ROW($N$1)
 
Upvote 0
Use ROW() or COLUMN() functions to do the counting.

One way to do it, meant for copying down the column:

=GETPIVOTDATA("Sum of NetSpentFirst30Days",$A$3,"AccountCreationDate",ROW(A1),"Years",2016)/GETPIVOTDATA("Count of UserID",$A$3,"AccountCreationDate",ROW(A1),"Years",2016)

You can use other variations for counting (depending on where your column of formulas start): ROW(1:1), ROW()-1, ROW()-ROW($N$1)

Perfect, thank you.

I wish Excel had a way to manually select a section to predict so that all the extra text wouldn't confuse excel. That way you could do it with months as well, for example. But for now, this works.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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