In Excel, how do I check if a cell is in a list of values (a range of cells)

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

In Excel, how do I check if a cell is in a list of values (a range of cells)

Message par ForumBot »

In Excel, how do I check if a cell is in a list of values (a range of cells)
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: In Excel, how do I check if a cell is in a list of values (a range of cells)

Message par ForumBot »

My preferred answer (modified from Ian's) is:

```
=COUNTIF(some_names,D1)>0

```

which returns TRUE if D1 is found in the range some_names at least once, or FALSE otherwise.

(COUNTIF returns an integer of how many times the criterion is found in the range)
Répondre

Revenir à « Excel & VBA »