For loop without programming and codingHey there,
I have 3 columns (i, j, and k), could you help how to use the "for" formula (without programming and coding) to make a loop and link between these columns?
Regards,
Re: For loop without programming and codingWe're going to need some more details here about what you mean by "loop and link between these columns."
Can you share a mocked up example of the table you have and what you want as a result?
Re: For loop without programming and coding
Re: For loop without programming and codingThe formula editor for the Z column is inside an implied loop that runs for every row in the table; you might be able to just write
x + 5*y
as the Z column formula to get the x and y values from the same row.
Re: For loop without programming and codingThanks, but what about " i," and " j" values?Re: For loop without programming and codingI have attached the details, Sir.Re: For loop without programming and codingI'm not seeing attachments.
But now I'm imagining your table might be similar to this set of columns:
ILatitude JLongitude Temp Wind FeelsLikeCalculatedFromTempAndWind
where the lat/lon (i and j) have no bearing on the calculated value which is only depending on temp and wind. But you might want to use them on a contour plot of FeelsLike by lat,lon. If that's similar to your data, use a simple column formula for FeelsLike and then make the contour plot from lat, lon, FeelsLike.
Re: For loop without programming and codingI'm afraid I still don't understand what your resulting column should look like.
You've written:
Z(i,j) = x * 5y;
and you've said that you want:
- i to go from 0 to 90
- j to go from 0 to 180
So, do you want your z column filled with:
z(0,0) = 0 * 5 * 0 = 0
...
z(90, 180) = 90 * 5 * 180 = 81000
As @Craige_Hales pointed out, the For() function isn't (generally speaking) appropriate for use in a formula column, nor is it required.
In this case you should use the Count() or Sequence() functions in an i column and a j column to build a data table with your i and j sequences and then a z column with the formula:
i * 5 * j
Edit: Attaching a data table that shows Count() and Sequence() columns.