+ Reply to Thread
Results 1 to 6 of 6

how to add formula result x number of rows below a cell based on a variable value

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    how to add formula result x number of rows below a cell based on a variable value

    I don't think the title explains very well, but didn't know how else to describe what I am trying to do, hope someone can help.

    If there is a value in say a12, I would like to add another value in the same column a variable number of rows below based on a value in say cell d1.

    So to be clear, a12 holds "add slide". I would like to automatically insert "add slide" 10 rows below in the same column, 10 being held in cell d1

    Any help appreciated

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,921

    Re: how to add formula result x number of rows below a cell based on a variable value

    Using regular Excel formulas, you would have to have a formula in each cell where it's possible to show the result. That is going to depend on the possible range of values in D1. Is this just for A12, or are there also values in other cells that have to be considered?

    I would put this formula in A13 and copy down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However, if your situation is complicated--you have to consider other cells in column A, not just A12--it might be easier to use macros.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: how to add formula result x number of rows below a cell based on a variable value

    Hi 6StringJazzer,
    Thanks for taking the time to help out. Your formula does exactly what I asked, however as you thought the real scenario is much more complicated.
    Perhaps it would be better if I uploaded a sample workbook to illustrate what I'm trying to achieve. I hoping you would be kind enough to take a look and help me solve the problem.
    I'll post again shortly with the sample workbook.
    regards

  4. #4
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: how to add formula result x number of rows below a cell based on a variable value

    The “working Schedule” sheet is the one I’m asking for help on.
    CB 1, CB 2 etc refers to the Cellbuilders on the Grafting Plan sheet.
    The “Grafting Plan” sheet provides the data to the working schedule, anything in RED is a variable that can vary the outcome of the data on the working schedule.
    D12 – L12 provide the tasks assigned in the working schedule.
    Dates shown from D17 – L300 are the dates assigned to the tasks in the working schedule..

    You will see I have formulas that bring the data correctly to the working schedule, but what I need is to be able to take account of any changes in the variables on the grafting plan. I have no clue as to how to go about this, a bit beyond my current understanding.
    The aim is to get a daily work schedule for all active cellbuilders based upon the grafting plan.
    I’ve attached a sample workbook.
    Thanks in anticipation.
    Attached Files Attached Files

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,921

    Re: how to add formula result x number of rows below a cell based on a variable value

    This is quite a different problem than your original question, which is why we encourage people to describe their problem, and not what they think the solution is. It will take me a little time to digest what is going on here before I get back to you. Someone else may beat me to it.

  6. #6
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: how to add formula result x number of rows below a cell based on a variable value

    In an effort to try and find a way forward I stumbled across this code "Code for the InsertRowsAndFillFormulas Macro (#insrtrow)" on this page : http://dmcritchie.mvps.org/excel/insrtrow.htm#offset

    Might this help to achieve my goal, if adapted in some way ?

    Or at least stimulate some ideas.

    Regards

+ 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. Hiding Rows based on a cell Value that is a result of a formula
    By erydius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2014, 08:30 PM
  2. Replies: 1
    Last Post: 08-21-2012, 02:46 PM
  3. Hide/Unhide rows based on cell value (result of formula)
    By tjanda in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-17-2012, 05:57 PM
  4. Adjust Result based on Variable Row Number
    By leewad in forum Excel General
    Replies: 2
    Last Post: 03-10-2011, 08:16 AM

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