|
|
|
|
|
by gus_massa
3990 days ago
|
|
The problem is that the spreadsheets are 2D, so you iterate easily over two variables, the row and the column. If you need to "program" this in an Excel spreadsheet For i = 1 to 5
For j = 1 to 5
If 2 * i + j = i * j then
Print i, j, "*"
End If
Next
Next
You can "write" this in a 6x6 block with the values 1 2 3 4 5
1 =If(2*B$1+$A2=B$1*$A2, "*", "")
2
3
4
5
And copy the formula from B2 to all the cells, so you get 1 2 3 4 5
1
2
3 *
4 *
5
|
|
(I care about this, btw, because my real job is making a new spreadsheet.)