Forum Discussion

breanna's avatar
breanna
Copper Contributor
Nov 03, 2025

How to distribute the value of one cell evenly in a sequence for the value of another cell?

Hi there, I'm trying to evenly distribute numbers (not a set value) to help with crocheting - taking the math out for testers/creators

 

right now I have the blue row working as a sequence, however I can't work out how to divide it equally 

 

So for the example above; there are 20 rows, there needs to be 8 increases (1 every 2.5 rows). 

 

 

How do I get that information to show in the column next to my sequence (Rows)?

If it's even possible - haha. I would like it to automatically work out like the below (manually entered)

 

Thank you

2 Replies

  • An approach I would suggest is to distribute the change uniformly between rows 0 and 21 (ensuring that the region outside the reduction zone has the exact number of stiches specified).  Rounding the fractional parts to the nearest integer will give the number of stitches required for each row.  Differencing the count of stitch will return increase/decrease for each row.  I use 365 so the formulas may look unfamiliar but it should convey the idea.

    = LET(
        DIFFλ,   LAMBDA(value, value - DROP(VSTACK(0, value),-1)),
        rowNum,  SEQUENCE(1+Rows,,0),
        stiches, ROUND(rowNum * Change / Rows, 0),
        table,   DROP(HSTACK(rowNum, initial+stiches, DIFFλ(stiches)),1),
        VSTACK(table, HSTACK("", "Total change", SUM(TAKE(table,,-1))))
      )

     

  • m_tarler's avatar
    m_tarler
    Bronze Contributor

    try this

    =LET(rows, 20, inc, 8, 
             incrows, ROUNDDOWN(rows/inc,0), 
             --(MOD(SEQUENCE(inc*incrows,,0),incrows)=0)
             )

    so you can replace the 20 and 8 with cell references

    line 2 calculates the inc/dec every number and takes only the integer portion

    line 3 then creates a sequence of only the used range and checks when that is an even multiple of the inc/dec value and outputs 1 or 0 otherwise.

    if you want a negatives then you need to multiply line 3 by SIGN()

    =LET(rows, 20, inc, 8, 
             incrows, ROUNDDOWN(rows/inc,0), 
             SIGN(inc)*(MOD(SEQUENCE(inc*incrows,,0),incrows)=0)
             )

     

Resources