Fill Data Series between multiple points, differing steps and gaps

gda_scooby

New Member
Joined
Mar 4, 2019
Messages
1
Afternoon, long time lurker, first time poster (Excel 2016 /Win 10 user)

I have successfully dabbled with various macros and tips from here, but I am now struggling with a seemingly simple task, but I'm not sure what to even search against.

I have a column of negative values, with 'gaps' between values.

The gaps are at different step values between cells, and the number of cells (ie the 'distance') between each value can differ (so can be 2 rows apart or up to 1000 rows apart)

Now I can manually select the range between the two cells and use HOME, FILL, SERIES - and it will automatically work out my step value (linear, columns) and fill that series successfully.

However I have a data set with approximately 12000 rows, and 100+ values to fill between.

How can I automate this?

trigger flagraw valuedesired result
a-29-29
-30
-31
a-32-32
-31.8
-31.6
-31.4
-31.2
a-31-31

<tbody>
</tbody>


The cells in my column between values appear blank, but are not strictly blank - they are the result of a =IF command else where, returning a "" value, then copy/pasted as values into the column I want to fill. therefore I cannot use CTRL + Cursor down to jump the gaps. (I presume this is a secondary problem I have caused)

I have multiple spreadsheets to work on, so any time savings would be appreciated

Thanks in advance,

Gareth
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi & welcome to MrExcel.
How about
Code:
Sub gda_scooby()
   Dim Rng As Range
   With Range("B2", Range("B" & Rows.count).End(xlUp))
      .Value = .Value
      For Each Rng In .SpecialCells(xlBlanks).Areas
         Rng.Offset(-1).Resize(Rng.count + 2).DataSeries xlColumns, xlLinear, xlDay, , , True
      Next Rng
   End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,192
Members
448,554
Latest member
Gleisner2

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