Set the gain to 1. Put the known weight on the scale and read out it's value from the ADC. Take the weight off and read out the ADC with nothing. Subtract those two values to get the weight of the known object in ADC counts. Divide that by the weight in kilograms to get the ADC counts per kilogram.
Take (2^162^24- weight of nothing) and divide by the desired maximum weight to get the desired ADC counts per kilogram. Divide the desired by the actual to get the gain value. Calculate the register value using the formula you posted above.