@Samboat
@Craige_Hales specified links are valuable. Please take the time to study them. Also, you need to take the time to study the JMP Scripting Guide. It can be found in the JMP Documentation Library available under the Help pull down menu
Here is my attempt at documenting the formula
// JMP formulas have a couple of automatic features that are taken
// advantage of in this application
// 1. The formula code is applied automatically to each row in
// the data table
// 2. What is passed to the output column as the resulting value
// is the last item processed. In this case, the variable
// named "value"
// The bins that are going to be created are calculated by dividing the
// maximum value in the target column minus the minimum value in the target
// column, by 24. This will give the size of each of the bins. But since
// JMP formulas are run on each row, the calculation of items that only need
// to be calculated once are more efficiently isolated by just having them
// calculated when the formula for row 1 is run
If( Row() == 1,
incr = (Col Max( :Your Column Name ) - Col Min( :Your Column Name )) / 24
);
// The variable "value", is an arbitrary variable, that is going to be used to
// hold the calculation of the bin
// To calculate the bin is a simple matter of subtracting the minimum value from the
// current rows value and then dividing by the calculated bin size(incr); Taking
// the Floor() of the calculation, just trims off the decimal placed.
value = Floor( (:Your Column Name - Col Min( :Your Column Name )) / incr ) + 1;
// Using the above binning technique, will always set any row values that are
// equal to the column's maximum value to a bin that is one bin value above the
// maximum number of bins desired. so the simple IF() statemet moves those values
// into the highest bin
If( value > 24, value = 24 );
// As mentioned above, the variable named "value" has been used to hold the calculated
// bin value. It is this value that is what is wanted for the value of the column
// the calculating. By specifying it as the last item processed, it ensures it will
// be the item used to populate the rows value.
value;
Jim