Fill formula without dragging down

SaS012

New Member
Joined
Jul 14, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi how do I fill formula without having to drag down? I have added a formula next to pivot table. The total number of rows keeps changing each time i refresh the pivot
I am trying to find a way to have formula filled up automatically if the adjacent cell in the pivot is not blank

I have explored OFFSET and INDEX but cant really find a way to have this done. Please help

Example below, i am trying to add simple formula on Col E. But i need it to autofill if Col D is not blank

=C6/D7

1661841899551.png
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I have added a formula next to pivot table
This thing doesn't work. If you need any kind of such result, better try Calculated Field option in Pivot Tables - That shall serve the purpose

Also, do I need to mention, their could be some limitations to what you can do in a calculated field.
 
Upvote 0
This thing doesn't work. If you need any kind of such result, better try Calculated Field option in Pivot Tables - That shall serve the purpose

Also, do I need to mention, their could be some limitations to what you can do in a calculated field.
I have values in my pivot table, i cant use calculated field. Even so, thats not the actual issue. Im looking for some way to auto fill formula without having to drag down.
 
Upvote 0
I have values in my pivot table, i cant use calculated field. Even so, thats not the actual issue. Im looking for some way to auto fill formula without having to drag down.
See with pivot table you can use any auto-fill beside it. You told yourself that rows keep adding to pivot table after every refresh.

I wonder if there can be some way in VBA to calculate number of rows in a pivot table and auto filling the formula accordingly.

If your question reaches some VBA expert and (s)he knows the solution, would tell you. In process I shall also learn something new.
 
Upvote 0
I have tried this formula = C1:INDEX(C:C,COUNTA(C:C),1)/(D1:INDEX(D:D,COUNTA(D:D),1)
and it works until i have blank rows in in my data, then it stops calculating
 
Upvote 0

Forum statistics

Threads
1,214,654
Messages
6,120,758
Members
448,991
Latest member
Hanakoro

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