Autofill with Dynamic Number of columns

Coach3131

Board Regular
Joined
Nov 23, 2007
Messages
242
I am looking to autofill a formula across a row where there is a check to see the first column with data then autofills to the last column on the sheet.

For example, Row2 may start at Column C while Row 3 may start at Column E... but they would both end at the same column for the autofill

Thus, I believe the variables needed are:
1) The current row
2) FirstCol which is checked when on that row
3) LastCol which is global for the sheet
 
Last edited:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Cuple of questions:

1. What is the global column you want it to autofill to?
2. Preset number of rows or variable? If variable, is there a Max you know it wouldn't go beyond -- OR is there a column in the sheet that would always have data in it for every row (I.E. a Col you can use to identify how many rows of data are currently on the sheet.)
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,877
Members
452,949
Latest member
Dupuhini

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