+ Reply to Thread
Results 1 to 7 of 7

Cell incremental fill up to a VARIABLE number

  1. #1
    Registered User
    Join Date
    11-16-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    20

    Cell incremental fill up to a VARIABLE number

    Hi!

    I'd like to know how I can fill a table column incrementally up to a variable number (please see image attached).
    EXCEL QUESTION.png

    Thank you in advance for your help!
    F
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Cell incremental fill up to a VARIABLE number

    in K4
    =IF(K3="","",IF(k3+1<=M$2,K2+1,""))

    in L4
    =IF(ISNUMBER(K3),L$2,"")

    and copy down the column

    You havent said what happens AFTER K3=M3, ie what happens about the value in M4 M5 M6 etc ?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-16-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    20

    Re: Cell incremental fill up to a VARIABLE number

    -ONLY M3 matters. The rest of column M and N are IRRELEVANT.
    In this example, for M3=120 I would like the following to happen automatically:
    -Column K is filled starting from K3=0 till K123=M3=120 (K4=1, K4=2, K5=3, etc.);
    -Column L is filled starting from L3=100000 till L123=L3=100000; (L"y"=L3);

    That's all. But I remind you that M3 is a variable value >0 so columns K and L will always be different.

    Thank for your reply but I'm sorry to say the commands you typed don't work.

    Thank you once again,
    F
    Last edited by FilipeF; 11-20-2018 at 11:37 AM.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Cell incremental fill up to a VARIABLE number

    Revised formulas

    in K4
    =IF(K3="","",IF(K3+1<=M$3,K3+1,""))

    in L4
    =IF(LEN(K4)>0,L$3,"")

  5. #5
    Registered User
    Join Date
    11-16-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    20

    Re: Cell incremental fill up to a VARIABLE number

    Instead of "," there should be ";". That way it works but I still have to manually drag both the columns K and L in order to get to the value =M3.

    I need it to be done automatically because what I want to do next is to plot those columns in a line graph.
    The value M3 should be the only input and both the table and the graph should be "spat" out automatically.

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Cell incremental fill up to a VARIABLE number

    Comma and semi-colon separators are locale dependent, comma works fine on my formulas, may be different as you're in Germany.

    "Done automatically" - Then you need VBA which I'm not an expert on.

  7. #7
    Registered User
    Join Date
    11-16-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    20

    Re: Cell incremental fill up to a VARIABLE number

    I was hoping it could be done without it. Nevertheless thank you for your help and time!

+ 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] Fill rows with incremental data
    By kobiashi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-23-2016, 09:25 AM
  2. Fill an incremental time entry in blocks of 4 rows
    By suedavies in forum Excel General
    Replies: 4
    Last Post: 04-08-2014, 04:01 PM
  3. Noob Incremental range variable function
    By ExcelShadow in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-29-2013, 04:37 PM
  4. Replies: 1
    Last Post: 05-08-2012, 09:31 PM
  5. Macro Code to fill a variable number of rows
    By rholloman in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2011, 05:46 PM
  6. Replies: 3
    Last Post: 12-30-2010, 05:32 AM
  7. Fill range with incremental numbers
    By Jaymond Flurrie in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-26-2008, 01:13 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