"CASE" function in Excel
Solved
Hello,
I would like to use a function like "CASE" in Excel instead of nesting "IF" functions within each other. My goal is to perform the following test:
If Cell A1 = Cell B1 then ...
If Cell A1 = Cell B2 then ...
If Cell A1 = Cell B3 then ...
If Cell A1 = Cell B4 then ...
If Cell A1 = Cell B5 then ...
If Cell A1 = Cell B6 then ...
...
Thank you in advance
I would like to use a function like "CASE" in Excel instead of nesting "IF" functions within each other. My goal is to perform the following test:
If Cell A1 = Cell B1 then ...
If Cell A1 = Cell B2 then ...
If Cell A1 = Cell B3 then ...
If Cell A1 = Cell B4 then ...
If Cell A1 = Cell B5 then ...
If Cell A1 = Cell B6 then ...
...
Thank you in advance
Configuration: Windows 2003 Internet Explorer 6.0
4 answers
-
Hello to both of you,
Pleduc, as far as I know, the CASE you’re talking about, which advantageously replaces IF functions, is a VBA Excel instruction and is not used directly in Excel formulas.
In which case, the syntax is as follows:
Select Case Range("A1").Value Case Is = Range("B1").Value 'instructions Case Is = Range("B2").Value 'instructions Case Else 'instructions in case none of the conditions are met End Select-
-
-
@anonyme
Hello
It's crazy what you can learn by browsing this forum.
I thought AI would kill it, but I'm coming back to it.
AIs are often bad for Excel.
Thanks to those who give their time, without expecting anything in return other than gratitude.
We'll never say it enough.
Finally, something where money has no place.
-