ERLANDSEN DATA CONSULTING Excel & VBA Tips   Informasjon på norsk / Information in Norwegian

These pages are no longer updated and are only available for archive purposes.

Click here to visit the pages with updated information.

Select between several options

The logical function IF(logical_test,if_true,if_false) can be used up to 7 times within one formula. Such a function will be very complicated due to the large number of parentheses and separator signs. By using the CHOOSE(index,choice1,choice2,...)-function it's easy to select between up to 29 different alternatives. The only limitation is that the index value must be a number between 1 and 29.

Examples :
=CHOOSE(2,"First","Second","Third","Fourth") returns the text Second.
=CHOOSE(3,1000,2000,3000,4000) returns the number 3000.


Document last updated 2000-02-05 12:44:52      Printerfriendly version


Erlandsen Data Consulting   
Excel & VBA Tips   Copyright ©1999-2024    Ole P. Erlandsen   All rights reserved
E-mail Contact Address