In numbers I have columns with data like this:
I want to iterate through cells and for ex. if value of cell in row 6 is not equal to value of. cell in row 5 then add an empty row above the row 6 (below 5)
this is my code but doesn't work:
tell column "A"
set nbr to count rows
set x to 2
repeat with r from x to nbr
set aVal to value of cell r
repeat with s from x + 1 to nbr
set aNVal to value of cell s
if aNVal is not equal to aVal then
add row above s
exit repeat
end if
end repeat
set x to x + 1
end repeat
end tell

sbut what is that? It is an integer. You need to flesh it out, egrow s. The reason for the error is that '6' is not a range.