Skip to content

Instantly share code, notes, and snippets.

@silasb
Created November 12, 2009 20:42
Show Gist options
  • Save silasb/233259 to your computer and use it in GitHub Desktop.
Save silasb/233259 to your computer and use it in GitHub Desktop.
# current
Formula.counta(:r => -People.count, :r2 => -1)
# new
Formula.counta(:rows => -People.count..-1)
# -or-
Formula.counta(:row => [-People.count, -1])
# -or-
Formula.counta(-People.count..-1, nil)
Formula.counta(nil, -ParentItems..-1)
# In the first case you might be able to drop the nil at the end
Formula.counta(-People.count..-1) # but it becomes less clear.
# References
# <Cell ss:Formula="='rats'!R[23]C[39]"/>
# <Cell ss:Formula="='rats'!R[24]C[38]"/>
# etc.
Formula.'work '(:r => -People.count, :c => 39) # this won't work but gives you an idea.
# dropping Class name
'work '.to_ref(:row => -People.count..39)
tab1 << work1.reference(:row => people_that_finished, :col => parent.followups_sorted.count-1)
# -or something more practical/do-able
Formula.ref(work1.name, :row => -People.count..39)
# produces:
# "'rats'!R[24]C[38]"
# which means that we would need to add a `=` at the beginning if a certain condition is met
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment