![]() |
Automating Fill series Function Multiple times ?
I hope someone can help me out.
I have a column of data with blank gaps for example somthing like the following 15 46 55 32 21 48 59 I can manual select the value before the gaps/blank cells to the value after the gaps so that they are highlighted and just do a Fill series function and excel atuomaticly will interpolate values for the gaps. However I have a rather large data set with lots of gaps and it is not very practical to do this manualy for each gap in the column of data. I am have been trying to get excell to automaticly do this for all the gaps, however have not found a method to do this. Any suggestions or help ? Dan. |
Automating Fill series Function Multiple times ?
Hi Dan;
You can use a sub like this sub try() 'Grab the address for where I am 'this should be the top cell of the column 'you want to select CellToReturnTo = ActiveCell.Address Range("A1").Select ActiveCell.SpecialCells(xlLastCell).Select MyLastRow = ActiveCell.Row Range(CellToReturnTo).Select Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells (MyLastRow, ActiveCell.Column)).Select End Sub Thanks, Greg -----Original Message----- I hope someone can help me out. I have a column of data with blank gaps for example somthing like the following 15 46 55 32 21 48 59 I can manual select the value before the gaps/blank cells to the value after the gaps so that they are highlighted and just do a Fill series function and excel atuomaticly will interpolate values for the gaps. However I have a rather large data set with lots of gaps and it is not very practical to do this manualy for each gap in the column of data. I am have been trying to get excell to automaticly do this for all the gaps, however have not found a method to do this. Any suggestions or help ? Dan. . |
Automating Fill series Function Multiple times ?
I appreciate your input and help but that is not quite what I was after.
here is what the code looks like when I preformed the oporation on 3 gaps and recorded the macro. Sub Macro1() Selection.End(xlDown).Select Range("B25:B27").Select Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _ Step:=-0.959999999999997, Trend:=False Selection.End(xlDown).Select Range("B66:B68").Select Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _ Step:=0.315000000000001, Trend:=False Selection.End(xlDown).Select Range("B96:B98").Select Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _ Step:=-0.515000000000001, Trend:=False End Sub I need a way to automate this type of procedure. Somthing that will find the gaps then interpolate values for gaps between the value just before the gap and the value just after the gap and than continue finding and intorpolating this process for the rest of the gaps.....? "GJones" wrote: Hi Dan; You can use a sub like this sub try() 'Grab the address for where I am 'this should be the top cell of the column 'you want to select CellToReturnTo = ActiveCell.Address Range("A1").Select ActiveCell.SpecialCells(xlLastCell).Select MyLastRow = ActiveCell.Row Range(CellToReturnTo).Select Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells (MyLastRow, ActiveCell.Column)).Select End Sub Thanks, Greg -----Original Message----- I hope someone can help me out. I have a column of data with blank gaps for example somthing like the following 15 46 55 32 21 48 59 I can manual select the value before the gaps/blank cells to the value after the gaps so that they are highlighted and just do a Fill series function and excel atuomaticly will interpolate values for the gaps. However I have a rather large data set with lots of gaps and it is not very practical to do this manualy for each gap in the column of data. I am have been trying to get excell to automaticly do this for all the gaps, however have not found a method to do this. Any suggestions or help ? Dan. . |
All times are GMT +1. The time now is 07:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com