+ Reply to Thread
Results 1 to 13 of 13

distribute number on excel cell according to value

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    distribute number on excel cell according to value

    dear all
    please see my attached file with sample that i want to do like automatic
    when i enter value in cell like 10
    in other column that have formula wrote the following
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    and if i wrote any other value it directly fill automatic cell
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: distribute number on excel cell according to value

    With your set up...
    In B1:
    =IF(ROW()<=A$1,ROW(),"")

    Copy down.

    Copy to G1 and copy down.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: distribute number on excel cell according to value

    In B1 enter this formula and drag down
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: distribute number on excel cell according to value

    many thanks dear Robert its wrok very good
    i have anthoer qestuion realted to this also
    if i want to disrtibute this to 1 meaning if i enter 10
    give me
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    and if i enter any value with decimal for example 5.75 give me like
    1
    1
    1
    1
    1
    0.75

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: distribute number on excel cell according to value

    In B1:
    =IF(ROW()<=A$1,1,IF(ROW()-1<A$1,A$1-ROW()+1,""))

    Copy down.

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: distribute number on excel cell according to value

    Dear CK76
    its work but only when i start from first row but if i start from third row give me missed data

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: distribute number on excel cell according to value

    If starting from row other than the first. Just add cell reference within Row function.
    I. E. Row(A1) in starting cell.
    Or you can subtract the difference (in this case Row() - 2)

  8. #8
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: distribute number on excel cell according to value

    please i dont understand what you mean exactly
    you mean like the folloiwng
    =IF(ROW()<=A$1,1,IF(ROW()-2<A$1,A$1-ROW()+1,""))

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,052

    Re: distribute number on excel cell according to value

    or use this:

    =IF(ROWS($1:1)<=A$1,1,IF(ROWS($1:1)-1<A$1,A$1-ROWS($1:1)+1,""))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  10. #10
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: distribute number on excel cell according to value

    what about this
    =IF(ROW()<=$A$1,ROW(),"")
    how also do this

  11. #11
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: distribute number on excel cell according to value

    Did you test?

    Row(A1) = 1

    And since it's relative reference. As you move down you increment by 1.

    So, if you enter following formula in C3 and copy down... you get the result you asked for.
    =IF(ROW(A1)<=A$1,1,IF(ROW(A1)-1<A$1,A$1-ROW(A1)+1,""))

    Or using 3rd row - 1st row = 2
    =IF((ROW()-2)<=A$1,1,IF((ROW()-3)<A$1,A$1-ROW()+3,""))

  12. #12
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: distribute number on excel cell according to value

    what about this
    =IF(ROW()<=$A$1,ROW(),"")
    for first post t give me
    1
    2
    3
    4
    5
    6
    7
    8
    9
    and soon

  13. #13
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: distribute number on excel cell according to value

    .... same thing.
    =IF(ROW(A1)<=$A$1,ROW(A1),"")

+ 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: 12
    Last Post: 02-12-2017, 06:09 PM
  2. Distribute the value of number according to table
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2014, 01:01 PM
  3. Replies: 3
    Last Post: 10-30-2014, 02:13 PM
  4. distribute a number in different coloums
    By devmaurya in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-29-2014, 02:29 AM
  5. [SOLVED] Distribute contents of a cell into other cells according to number of characters
    By Sacharny in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-14-2013, 10:38 AM
  6. Solving for X to distribute a number
    By gregburbidge in forum Excel General
    Replies: 4
    Last Post: 09-10-2009, 08:04 PM
  7. How to distribute a number into different categories
    By englephat in forum Excel General
    Replies: 3
    Last Post: 06-27-2007, 10:34 PM

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