Microsoft KB Archive/68019

{| = Get.Cell with Type_num 24 Returns Color of Font Not Number =
 * width="100%"|

Last reviewed: November 1, 1994

Article ID: Q68019

SUMMARY
Using the Get.Cell macro function with a type number of 24 returns the color of the font used, not the color described under the Format Number command.

MORE INFORMATION
The Get.Cell function along with a type number of 24 returns a number from 0-16, which corresponds to the color selected under the Font command of the Format menu. The number 0 corresponds to Automatic, and the numbers 1-16 correspond to the 16 color positions in the color Palette.

If the number -23 was formatted with a blue font and a number format was also used that made negative numbers red, the number would display red because any number format will override a format font color setting. In the case above, one might expect the Get.Cell function with a type_num of 24 to return the number 3, which corresponds to red. However, the function actually returns a value of 5, which corresponds to the color blue because that is the font color selected.

Currently, the only way to get the number format color used is to use the Get.Cell function with a type_num of 7, then extract the color using the RIGHT, LEFT, and LEN functions.