Finding exact numbers

Jimboexcel

New Member
Joined
Sep 29, 2017
Messages
20
Hi!

I'm new to excel. Using the following formula, when searching for single-digit numbers, double-digit number are also found and reverse, e.g. 62 and 26.

=IF(ISBLANK($F$1),0,ISNUMBER(SEARCH($F$1,$A1&$B1&$C1&$D1)))

How do I modify this formula to search for exact numbers

Thanks

Jimbo
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try:
=IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))
 
Upvote 0
Welcome to the MrExcel board!

Thanks, but the above formula does not apply formatting and highlight the rows when the number is entered.
That could well be because neither formatting nor highlighting were mentioned in your first post. ;)

Remember that we cannot see your sheet or know what you have, where it is or what you are trying to achieve unless you tell us and/or show us. Some further information would help.
 
Upvote 0
Are you tgrying to do conditional formatting?

If so this formula should work.
-Highlight the cells A1 to D1
-CONDITION FORMATTING
-New RULE
-Use Formula
-Then enter formula
-Choose Formate
Excel Workbook
ABCDEF
1622267726
Sheet
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A11. / Formula is =IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))Abc
B11. / Formula is =IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))Abc
C11. / Formula is =IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))Abc
D11. / Formula is =IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))Abc
F11. / Formula is =IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))Abc
 
Upvote 0
You're right Peter, I should have been more specific.

Basically, the formula is in one cell as a search box. The purpose is that if I enter the number 77 for example, it highlights the entire row where the number 77 is located. However the problem is when I enter 77, anything with a 7 in it is highlighted.
 
Upvote 0
Actually, the other way around, if I enter 7, anything with 7 is highlighted, 73, 77, etc.

AhoyNC, I tried that, however same problem arises.
 
Upvote 0
Try this. My search box is J1.
I selected A1:E9 and applied the Conditional Formatting formula shown.

Excel Workbook
ABCDEFGHIJ
1191519812
217811617
39157212
4131513119
520201112
61713275
73171233
818161672
912917516
Sheet2 (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A11. / Formula is =COUNTIF($A1:$E1,$J$1)Abc
 
Upvote 0
Thanks Peter, it worked and is much simpler. I'm from downunder too, enjoy your day.
You're welcome.

FWIW, AhoyNC's suggestion also works for me. It's just that if you were applying it to a number of rows in columns A:D, you would need to remove these two $ signs.

=IF(ISBLANK($F$1),0,ISNUMBER(MATCH($F$1,$A$1:$D$1,0)))

.. and it has more checks in it than needed I believe. This should also work for data in columns A:D and search bow in F1

=MATCH($F$1,$A1:$D1,0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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