View Single Post
You could assign a script to a keystroke or toolbar button.

If, for example, you select a date or number column by clicking on its header (so that the whole column has a blue highlight) the following script will fill the cells of all rows with values derived from those of the first one or two rows.

(The difference between row values defaults to one day (or 1.0) but if row 2 already contains a value when the script is run, the series will continue the interval/difference between rows 1 and 2).

Code:
-- FILL DATE OR NUMBER COLUMN WITH VALUES
-- BASED ON THE VALUES IN THE FIRST ONE OR TWO ROWS

tell application id "OOut"
	if (count of documents) < 1 then return
	tell front document
		set lngRows to count of rows
		if lngRows < 3 then return
		set lstSeldCols to selected columns
		if (count of lstSeldCols) < 1 then return
		set {eType, idCol} to {type, id} of first item of lstSeldCols
		
		if eType is not in {number, date} then return
		set {varStart, varNext} to {value of cell id idCol of row 1, value of cell id idCol of row 2}
		
		if eType = number then
			if varNext is missing value then
				set varDelta to 1
				set iStart to 2
			else
				set iStart to 3
				set varDelta to varNext - varStart
			end if
			
			-- FILL REMAINING CELLS WITH NUMBERES
			repeat with i from iStart to count of rows
				set value of cell id idCol of row i to varStart + (varDelta * (i - 1))
			end repeat
		else -- date
			if varNext is missing value then
				set varDelta to 1
				set iStart to 2
			else
				set varDelta to ((varNext - varStart) / days) as integer
				set iStart to 3
			end if
			
			-- FILL REMAINING CELLS WITH DATES
			repeat with i from iStart to lngRows
				set value of cell id idCol of row i to varStart + (varDelta * (i - 1) * days)
			end repeat
		end if
	end tell
end tell