I would like to compare a cell (A1) with four other cells in a column and return a string ("Not found") if no match is detected. What formula can I use to accomplish this task?
Your help is much appreciated.
[Solved] Compare a cell with a column of cells
-
- Posts: 1
- Joined: Wed Feb 21, 2018 9:50 pm
[Solved] Compare a cell with a column of cells
Last edited by jimglockner on Thu Feb 22, 2018 7:54 pm, edited 2 times in total.
Openoffice 4.1.2
Windows 10
Windows 10
Re: Compare a cell with a column of cells
Let's say you want to search for the value of A1 in B1:B4. You can return either Found or Not Found with
Code: Select all
=IF(COUNTIF(B1:B4;A1) > 0;"Found"; "Not Found")
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.