+ Reply to Thread
Results 1 to 8 of 8

Getting Cell Entry from Previous Cell

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Getting Cell Entry from Previous Cell

    In a table I want a column in which each cell value depends on the value in the previous cell in the same column. For example, each entry to be double (or half, or the square of, etc) the value in the previous cell.

    And I want this process to stop after a specified number of cells have been filled.

    How can I do this, please?

    Thanks,

    Robert

  2. #2
    Registered User
    Join Date
    06-13-2018
    Location
    india
    MS-Off Ver
    2010;2007
    Posts
    54

    Re: Getting Cell Entry from Previous Cell

    Hello Robert,

    please be more specific or attach a sample file illustrating with what you are trying to achieve.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Getting Cell Entry from Previous Cell

    In A1 enter the number of cells to fill.
    In A2 enter the starting number.
    In A3 enter this formula, =IF(ROWS(A$3:A3)>A$1,"",A2)

    A2 at the end of the formula should be edited with the desired calculation.

  4. #4
    Registered User
    Join Date
    01-27-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Getting Cell Entry from Previous Cell

    Hi Jason,

    Thanks, but it didn’t it let me achieve exactly what I wanted to do.

    Having entered the formula in A3 (and editing the last part, eg A2*2) I still had to drag that formula down the column to accommodate the number of cells I wanted filled. Certainly if I dragged too far the formula caused the entries to stop at the correct number.

    Is there any way to achieve this automatically, ie once the formula is entered in Cell A3 it goes ahead and fills the required number of cells with no further input from the user?

    So what I am after is this:
    A1 I enter the number of cells I want filled. eg 6
    A2 I enter the starting number. eg 5
    A3 Here I put the formula, eg something to double the previous entry. So in my example the entry in A3 becomes 10 and the rest of the entries (A4 to A7) are generated without any further action by me.
    A4 20
    A5 40
    A6 80
    A7 160 stopping there, since I now have my 6 entries from 5 to 160.

    How can I do this?

    Robert
    Last edited by AliGW; 06-17-2018 at 02:07 AM. Reason: Unnecessary quotation removed.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,426

    Re: Getting Cell Entry from Previous Cell

    You only have to enter and drag the formula down once. Drag it down further than you are ever likely to need. Then it’s just a case of changing values in the input cells.

    If you want to add an extra calculation to the formula, then it needs to be in an additional input cell, not in the formula itself.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Getting Cell Entry from Previous Cell

    As Ali suggested, just drag it down beyond the number of rows you are ever likely to use. If you format the column as a table then changing the first formula from A2*2 to A2/2 as needed should modify the rest of the column without needing to fill down again.

    For a formula to be automatically entered into additional rows, you would need to enter data manually into the preceding column, so this will not work for you.

    The only other option is with vba, but given that you want to change the criteria of the formula, again, this could get messy.

  7. #7
    Registered User
    Join Date
    01-27-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Getting Cell Entry from Previous Cell

    Thanks Jason and Ali.

    Robert

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,426

    Re: Getting Cell Entry from Previous Cell

    You're welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Stop entry overwrite and clear cell data off of entry in another cell
    By COURTTROOPER in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2017, 02:33 PM
  2. [SOLVED] Restrict Data Entry if previous cell doesn't fall between a particular range
    By dezspert22 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2016, 06:27 PM
  3. [SOLVED] Make Cell Reference to Either a cell in Previous Tab or the Previous Tabs Name
    By paddyk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2013, 01:13 PM
  4. Replies: 4
    Last Post: 03-22-2011, 09:44 PM
  5. Replies: 1
    Last Post: 01-23-2011, 08:00 AM
  6. Macro to check for blank cell entry, copy previous value, and check for duplicates
    By xPunxNotDeadx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2009, 06:33 PM
  7. Replies: 2
    Last Post: 09-18-2008, 05:47 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