Page 107

30 EXCEL FUNCTIONS IN 30 DAYS – PAGE 104

Example 2: Test for Number type before multiplying You could use the TYPE function with CHOOSE, to multiply valid numbers, or show a message, if something else is entered. =CHOOSE(MIN(TYPE(B3),3),B3*C3,"No text","Enter Qty") • If a number is entered in B3, the TYPE function returns 1. That's less than 3, so the MIN function returns 1, and CHOOSE returns the result of B3*C3.

• If text is entered in B3, the TYPE function returns 2. That is less than 3, so the MIN function returns 2, and CHOOSE returns the message "No text".

• If anything else is entered in B3, the TYPE function returns a 4 or higher. The MIN function result will be 3, so CHOOSE returns the message "Enter Qty".

www.contextures.com

30 Excel Functions in 30 days  
30 Excel Functions in 30 days  
Advertisement