+ Reply to Thread
Results 1 to 6 of 6

auto fill series linear growth trend between non-adjacent cells in a column

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    4

    auto fill series linear growth trend between non-adjacent cells in a column

    Hi,

    I am a building energy consultant and am trying to create an hourly weather file from annual data (in other words, taking 365 days of data and spreading it over 8760 hours in the year).

    I have the lowest temperature (recorded at around 6 am) and the highest temperature (recorded at 3 pm) and need to fill the in-between cells with a linear growth series.

    QUESTION: How can I auto-fill the empty cells with a series between two populated cells. Especially when two cells are 8 rows apart and the next two cells are 14 rows apart.

    I am attaching the Excel file herewith for your perusal and response.

    Thank you for providing a platform such as this. I shall be grateful for any possible help in this regard.

    Kindly

    Gaurav

    THE_Weather_File.xlsm

  2. #2
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: auto fill series linear growth trend between non-adjacent cells in a column

    hi,

    I had a look at your file, but didn't make that much out of it.

    However, maybe you can adapt the following code to what you want.
    If you have some numbers scattered down columnA with spaces between, the code will linear interpolate the spaces.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-06-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: auto fill series linear growth trend between non-adjacent cells in a column

    Thanks for the quick reply. I'm sorry it isnt clear in the sheet. The trouble starts after row 559 in Column E (I actually sat and used the whole Fill>Series...>Linear>trend option to fill the earlier rows in Coumn E :p )

    The macro comes up with an error in the c(2) = c + (d - c) .... line. Can you help please? I am very new to using macros.

    Thanks for taking the trouble.

  4. #4
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: auto fill series linear growth trend between non-adjacent cells in a column

    the problem is the interpolation code only works with numerical values
    a number of your apparently blank cells seem not in fact to be truly empty cells.

    If you don't mind setting your columnE to values only, then try the following slightly modified code. it works OK for me
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-06-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: auto fill series linear growth trend between non-adjacent cells in a column

    I guess you get this a lot, but god bless you. Thanks endlessly. You just solved something that i've spent three days on, in seconds. I owe you big time. :D

  6. #6
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: auto fill series linear growth trend between non-adjacent cells in a column

    Thanks for the feedback.

    Glad to be of some help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 07-11-2012, 05:51 AM
  2. Excel 2007 : Auto fill non adjacent cells +
    By quintain in forum Excel General
    Replies: 1
    Last Post: 05-03-2012, 12:52 PM
  3. Auto-fill adjacent cells based on start/stop date?
    By jeffreyray in forum Excel General
    Replies: 3
    Last Post: 10-03-2011, 06:49 PM
  4. Replicating: Fill, Series..., Growth trend.
    By JoshuaSQ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2007, 08:24 AM
  5. Auto trend series
    By tahirawan11 in forum Excel General
    Replies: 2
    Last Post: 07-03-2007, 12:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1