ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   CASE statement equivalent (https://www.excelbanter.com/excel-worksheet-functions/7938-case-statement-equivalent.html)

Beema

CASE statement equivalent
 
I need a function which does the following, but cannot find one:

[to be put in cell B2]

=(CASE A2
when "AAA" then "Some text"
when "BBB" then "Other Text"
else "")

Is anything, other than a bunch of nested IF statements, possible?

Thanks



Frank Kabel

Hi
use a lookup table together with VLOOKUP

--
Regards
Frank Kabel
Frankfurt, Germany

Beema wrote:
I need a function which does the following, but cannot find one:

[to be put in cell B2]

=(CASE A2
when "AAA" then "Some text"
when "BBB" then "Other Text"
else "")

Is anything, other than a bunch of nested IF statements, possible?

Thanks





All times are GMT +1. The time now is 07:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com