Search of values doesn't work and gives errors

Ardin

New Member
Joined
Jan 27, 2021
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I'm currently working on a kind of CRM system in excel, and I just wanted to have a function to see if the name in "U2" equals one of the names in "V2:$FB$" then give an error or false or something. This works with several kinds of formula, however, when I copy it to the next cell, so then it becomes if the name in "V2" equals one of the names in "W2:$FB$", then it gives errors like "#spill!" and other ones as well with different formulas. When I searched it up, I saw because it was blocking the values, however, I am putting the formula in U1/V1 etc., so how can it be blocked?

Does someone maybe have a solution or a formula which I can use?

Thanks in advance!

Ardin
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Ardin

Can you post the formula you are using?
 
Upvote 0
Hi Norie,
Thanks for your quick reply. I used several different formulas, but this is the last one I tried and got the "#SPILL!" error.
=IF(ISNUMBER(SEARCH(U2,V2:$FB$)),FALSE,"")

But maybe I need to use another type of formula, do you have any idea about that?
 
Upvote 0
Hi
You are missing the end range FB
it should be some thing like
Excel Formula:
=IF(ISNUMBER(SEARCH(U2,V2:$FB$60)),FALSE,"")
in addition tis an array formulay You have to CTRL+SHIFT+ENTER
 
Upvote 0
SEARCH is used to find a substring in a string, so this formula:
Excel Formula:
=[URL='https://exceljet.net/excel-functions/excel-if-function']IF[/URL]([URL='https://exceljet.net/excel-functions/excel-isnumber-function']ISNUMBER[/URL]([URL='https://exceljet.net/excel-functions/excel-search-function']SEARCH[/URL](U2,V2:$FB$)),FALSE,"")
is going to look for the value in U2 in every cell in the specified range and return multiple results, in fact it will return as many results as there are cells in the second range in the formula. i.e. if the second range consists of 10 cells 10 results will be returned

If you want to find if the value in U2 is in any cell in range use COUNTIF.
Excel Formula:
=IF(COUNTIF(V2, V2:FB10)>0, "Found", "Not found"
 
Upvote 0
SEARCH is used to find a substring in a string, so this formula:
Excel Formula:
=[URL='https://exceljet.net/excel-functions/excel-if-function']IF[/URL]([URL='https://exceljet.net/excel-functions/excel-isnumber-function']ISNUMBER[/URL]([URL='https://exceljet.net/excel-functions/excel-search-function']SEARCH[/URL](U2,V2:$FB$)),FALSE,"")
is going to look for the value in U2 in every cell in the specified range and return multiple results, in fact it will return as many results as there are cells in the second range in the formula. i.e. if the second range consists of 10 cells 10 results will be returned

If you want to find if the value in U2 is in any cell in range use COUNTIF.
Excel Formula:
=IF(COUNTIF(V2, V2:FB10)>0, "Found", "Not found"
Thanks again for the quick reply.
I tried your code =IF(COUNTIF(V2,W2:$FB$2)>0, "Found", "Not found"), however I got the same #SPILL! error. I think I fixed the error by adding a "@" to =IF(COUNTIF(V2,@W2:$FC$2)>0, "Found", "Not found").
However, to test the code, I put (on purpose) one of the names in that range, but it didn't work, it stayed on "Not found", do you know how to fix that?
 
Upvote 0
Hi
You are missing the end range FB
it should be some thing like
Excel Formula:
=IF(ISNUMBER(SEARCH(U2,V2:$FB$60)),FALSE,"")
in addition tis an array formulay You have to CTRL+SHIFT+ENTER
Thanks, this worked as well, could it be similar to "@"? However, the code didn't work, any ideas?
 
Upvote 0
Well,
Would you show some examples with expected results
 
Upvote 0
Ofcourse!
In the picture below you can see the formula that I used, and the result of it. However, in "O2" I got the same name as in "B2", which is value which I am searching for. But it still gives "Not Found". So, why is it that it not says "found"?
 

Attachments

  • Schermafbeelding 2021-01-28 om 10.26.06.png
    Schermafbeelding 2021-01-28 om 10.26.06.png
    60.9 KB · Views: 14
Upvote 0
In this case
Excel Formula:
=IF(ISNUMBER(SEARCH(B2,C2:O2)),"Found","Not found")
Just Enter
 
Upvote 0

Forum statistics

Threads
1,215,717
Messages
6,126,428
Members
449,314
Latest member
MrSabo83

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top