Find not finding in excel

RobbieL

Board Regular

Joined
Oct 4, 2007
Messages
109


  • #1

I have a sheet with a list of names on and I’ve noticed that when I use ctrl+F to use the find function, even when I know i have entered the correct name it still will not work. I have identifed times when I know the name is there on the sheet, but the find function says «Excel cannot find the data you are searching for»

Im unable to put any pics up as my work pc has java disable so photobucket ect won’t work but has anyone else come across this problem and how did you rectify it? A search macro perhaps?

Excel Facts

Format cells as date

Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

  • #2

Hi

Do you only have a single cell selected at the time you run Find? Also, make sure via the Options button when you go to Find that you don’t have «Match entire cell contents» checked (or possibly the «Match case» option either)

RobbieL

Board Regular

Joined
Oct 4, 2007
Messages
109


  • #3

Yes just a single cell selected and the 2 check boxes are not populated. If it would be more helpful I have taken a screen dump which I can upload later from my personal pc?

  • #4

I’m not sure why it wouldn’t be working — have you tried the usual things of closing and reopening the workbook? Go ahead and post a screenshot — hopefully someone will have an idea what the problem is.

Laxieryuah

New Member

Joined
Oct 31, 2017
Messages
11


  • #5

You can try also to select all then make find.
try this. press ctrl+a 2 times then you can find the word now by
pressing ctrl+f.

ZVI

ZVI

MrExcel MVP

Joined
Apr 9, 2008
Messages
3,875
Office Version
  1. 2019
  2. 2016
  3. 2010
Platform
  1. Windows


  • #6

May be Find format was set previously.
Try Ctrl-F — Format — Clear Find Format

JAWChemist

New Member

Joined
Apr 15, 2020
Messages
1
Office Version
  1. 2007
Platform
  1. Windows


  • #7

Old post but still seems to occur.
In the Find and Replace box, «Match entire cell contents» was not checked.
Checking it and un-checking it seemed to work.

File explorer found the file with an authors full name «Mair, B. J. and….». Using find and Within: Workbook did not find the worksheet.
In the worksheet with the entry, it did not find it even though clearly seen.
Used it to find cell with «Got» as the full cell entry. It found several. Tried it with Mair and it could not find it.
Even though the «Match entire cell contents» was unchecked, checked it and check mark appear, unchecked it and check mark disappeared.
It then found several cells with the partial information «Mair».

Rugger83

New Member

Joined
Jun 2, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows


  • #8

May be Find format was set previously.
Try Ctrl-F — Format — Clear Find Format

Thanks. This fixed my problem.

Similar threads

 

invirtus

Пользователь

Сообщений: 33
Регистрация: 27.03.2015

Добрый день всем.

Возникла проблема с методом Find. Вчера убил два часа, но так и не понял, почему он то работает, то нет. Через Find и Offset я пытаюсь сэмулировать экселевский Vlookup. Есть исходный файл с двумя колонками — в первой список ИНН, во второй — список номеров поставщиков. Макрос в testFile находит ИНН (с этим он прекрасно справляется), а потом используя ИНН должен искать мне номер поставщика. Он то работал вчера, то нет. Когда не работал, я сохранял файл, закрывал, открывал, запускал макрос построчно и по коду следил, что происходит после выполнения каждой строки, и он находил поставщика. Потом закрывал файл, открывал, запускал просто так и он не находил поставщика. Выкладываю файл где ищется ИНН и файл со списком поставщиков (готовый макрос не влезает по максимальному объему файла). Необходимый макрос — Sub PriceListShow(). Ниже интересующий меня блок кода, я не пойму, почему он не работает (уже перебрал все возможные варианты, но он так и не ищет строку).

Я начал грешить на то, что у меня String, а в файле со списком поставщиков формат данных «цифровой», но смена переменной на Double никакого результата не принесла.
Как видите ниже, я перепробовал различные варианты запросов (даже vlookup), но опять таки к какому то очевидному пониманию не пришёл. Надеюсь вы мне поможете и/или подскажете, как улучшить код.
Спасибо.

Код
On Error Resume Next
Dim SupplierINN As String
Dim SupplierBlockStart As String
Dim SupplierBlockEnd As String
SupplierBlockStart = Worksheets("Данные поставщика").Range("A1:C100").Find("*Контак*ормация*поставщика*").Address
SupplierBlockEnd = Worksheets("Данные поставщика").Range("A1:C100").Find("лицо*поставщика*").Address
SupplierINN = Worksheets("Данные поставщика").Range(Worksheets("Данные поставщика").Range(SupplierBlockStart & ":" & SupplierBlockEnd).Find("*ИНН*").Address).Offset(, 1).Value

If SupplierINN = Empty Then
PriceListAuto.Supplier = "НЕТ ИНН"
PriceListAuto.Supplier.BackColor = RGB(254, 230, 61)
PriceListAuto.SupplierLabel = "На вкладке ""Данные поставщика"" не указан ИНН. Уточните ИНН / Введите вручную"
Else

'xSupplier = Workbooks("PrismaTools.xlsm").Worksheets("Suppliers").Range(Range("A:A").Find(SupplierINN, , , xlPart).Address).Offset(, 2).Value
'If xSupplier = "" Then xSupplier = Workbooks("PrismaTools.xlsm").Worksheets("Suppliers").Range(Range("A:A").Find(SupplierINN, , , xlWhole).Address).Offset(, 2).Value
'If xSupplier = "" Then xSupplier = Workbooks("PrismaTools.xlsm").Worksheets("Suppliers").Range(Range("A:A").Find("*" & SupplierINN & "*", , , xlPart).Address).Offset(, 2).Value
'If xSupplier = "" Then xSupplier = Workbooks("PrismaTools.xlsm").Worksheets("Suppliers").Range(Range("A:A").Find("*" & SupplierINN & "*", , , xlWhole).Address).Offset(, 2).Value
If xSupplier = "" Then xSupplier = Workbooks("PrismaTools.xlsm").Worksheets("Suppliers").Application.WorksheetFunction.VLookup(CDbl(SupplierINN), "A:C", 3, 0)

xSupplierName = Workbooks("Suppliers.xlsm").Worksheets("Suppliers").Range(Range("C:C").Find(xSupplier, , , xlPart).Address).Offset(, 1).Value
If xSupplier = "" Then
PriceListAuto.Supplier = "НЕ НАЙДЕН"
PriceListAuto.SupplierLabel = "Поставщик не найден. Проверьте список поставщиков или введите номер вручную"
Else
PriceListAuto.Supplier = xSupplier
PriceListAuto.Supplier.BackColor = RGB(107, 198, 6)
PriceListAuto.SupplierLabel = xSupplierName
End If
End If


Изменено: invirtus28.07.2015 10:03:13

I’m looking for user ID #s from a list. However some users no longer exist. I’ve tried the test method, the on error go to method, and if err.number<> 0 then method. I still receive the Run-time error '91': object variable or with block variable not set. The number does not exist on the the list. Below is my code with a couple of fruitless attempts

On Error GoTo errorLn

If Err.Number <> 0 Then
 GoTo errorLn
End If
Cells.Find(What:=uSSO, After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Select

What other options are there? Or am I misplacing the lines of «error»? I have tried it before and after the «cells.Find…»

Community's user avatar

asked Aug 15, 2012 at 16:03

orangehairbandit's user avatar

You will want to do something different than have message boxes, presumably.

Dim myCell As Range

Set myCell = Cells.Find(What:=uSSO, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)

If (Not myCell Is Nothing) Then
    MsgBox "something!"

Else
    MsgBox "nothing"
End If

answered Aug 15, 2012 at 16:12

enderland's user avatar

enderlandenderland

13.7k17 gold badges100 silver badges152 bronze badges

I believe you’ll need to restructure it just a little bit. It is not the best practice to handle errors with On Error Resume Next, but you could try this:

On Error Resume Next
Cells.Find(What:=uSSO, After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Select

If Err.Number <> 0 Then
 '''Do your error stuff'''
 GoTo errorLn
Else
    Err.Clear
End If

Does that work for your situation?

Source: http://www.mrexcel.com/forum/excel-questions/143988-check-if-value-exists-visual-basic-applications-array.html

answered Aug 15, 2012 at 16:08

RocketDonkey's user avatar

2

Try this

Sub Sample1()
    Dim oSht As Worksheet
    Dim uSSO As String
    Dim aCell As Range
    
    On Error GoTo Whoa
    
    '~~> Change this to the relevant sheet
    Set oSht = Sheets("Sheet1")
    
    '~~> Set User ID here
    uSSO = "User ID"
    
    Set aCell = oSht.Cells.Find(What:=uSSO, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False)
    
    '~~> Check if found or not
    If Not aCell Is Nothing Then
        MsgBox "Value Found in Cell " & aCell.Address
    Else
        MsgBox "Value Not found"
    End If
    
    Exit Sub
Whoa:
    MsgBox Err.Description
End Sub

I also would recommend reading this link where I have covered .Find and .FindNext

Topic: .Find and .FindNext In Excel VBA

Link: https://web.archive.org/web/20160316214709/https://siddharthrout.com/2011/07/14/find-and-findnext-in-excel-vba/

Kolappan N's user avatar

Kolappan N

3,4812 gold badges35 silver badges41 bronze badges

answered Aug 15, 2012 at 16:09

Siddharth Rout's user avatar

Siddharth RoutSiddharth Rout

146k17 gold badges206 silver badges250 bronze badges

1

  1. 05-10-2013, 08:11 PM


    #1

    snolem75 is offline


    Registered User


    Find (Ctrl + F) and Replace Not Working

    I have been experiencing a very frustrating problem with excel’s Ctrl+f…. I cannot find #’s anymore, only text…. I can’t find values even when they are in view on the sheet and I type the exact value I’m looking at… I have tried ALL combinations of options in the Ctrl+F box….

    Anybody else ever experience this problem, and how did you fix it?!?

    Thanks in advance for you help!

    Cheers and have a nice weekend

    -Snolem-


  2. 05-10-2013, 08:27 PM


    #2

    Re: Find (Ctrl + F) and Replace Not Working

    Hi and welcome to the forum

    when you press CTRL F, select the options and see whats seleced in the 3 options there, as well and make sure both «match case» and «match entire contents» are not selected.

    Under the 3 options, I have…
    Sheet
    By rows
    Formulas (you might want tp change this to values)

    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford


  3. 05-13-2013, 12:30 PM


    #3

    snolem75 is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Thank you for your quick reply! Unfortunately, I have gone through all of those options and the find feature is still not working to find numbers that I know exist because I’m looking at them on my screen trying to get the find feature to work.

    Anybody else?

    Thanks again!


  4. 05-13-2013, 02:51 PM


    #4

    Re: Find (Ctrl + F) and Replace Not Working

    can you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what you are searching for
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see «manage file»,
    click that and select «add files» (top right corner).
    click «select files» find your file, click «open» click «upload» click ‘done» bottom right. click «submit reply»

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.


  5. 05-14-2013, 12:05 PM


    #5

    snolem75 is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Thanks again! … Attached you’ll find a file and two screen shots of my searches performed both by values and in formulas without finding the result that is I know to be there because I’m looking at it…

    Cheers!

    Values.jpgMatch Formulas.jpg


  6. 05-14-2013, 12:23 PM


    #6

    Re: Find (Ctrl + F) and Replace Not Working

    Hello,

    You are trying to find the value in a formula.

    What you can do is, when you press Ctrl-F, check on «Match entire cell contents», and most importantly, under «Look in», instead of «Formula», choose «Values».

    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem


  7. 05-14-2013, 12:31 PM


    #7

    snolem75 is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Thanks for the awesomely quick response Lemice!

    Unfortunatley, I have tried every iteration of options possible… Attached is the screenshot of your suggested options, but to no avail

    Any other ideas!?!

    Thanks again guys

    Match Entire Cell Contents.jpg


  8. 05-14-2013, 12:38 PM


    #8

    Re: Find (Ctrl + F) and Replace Not Working

    For some reason I have to enter exactly 61,397.00, and uncheck «Match entire cells only», only by then it shows up …

    This is weird, maybe it’s just Excel being Excel.


  9. 05-14-2013, 12:47 PM


    #9

    snolem75 is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Good to know… This is strange, but at least I now have a work-around

    Cheers to you Lem and everyone else for helping!


  10. 12-05-2014, 07:14 AM


    #10

    SENTHILVELAN is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Hello ,

    Kindly check the attached file screen shot . I hope this should be helpful for you. if this is the root cause means


  11. 07-29-2017, 05:40 AM


    #11

    venkatap26 is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Hi sir,

    this is praveen from vijayawada i have problem find & replace option in excel 2010,i am finding repeated one word but only once find then cursor is go through excel sheet not find another word please help sir
    thanks & regads
    ch v praveeen


  12. 07-29-2017, 05:46 AM


    #12

    Re: Find (Ctrl + F) and Replace Not Working

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member — start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a

    link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

    Ali


    Enthusiastic self-taught user of MS Excel who’s always learning!
    Don’t forget to say «thank you» to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you’ve been given: help here. More about the Power suite here.


  13. 07-29-2017, 12:18 PM


    #13

    pi3volution is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    I have found that sometimes, you must search in the format of the cell.

    In my experience, I did some cohort analysis calculating repeat % and when I try to remove all 0 values from the results, I had to search for ‘0%’ instead of just 0 because the results were formatted in Percentage.


  14. 08-16-2017, 05:17 PM


    #14

    geselaw is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    I think this is a window bug. I have office 2016 installed both on my laptop(win10 home) and desktop (win7pro). Using the same workbook, find and replace work perfectly on my laptop but not on my desktop. The desktop was on office 2013 before and find and replace was not working. That was why I upgrade the desktop to office 2016 but still not working. So by elimination, I say it is win 7 issue. I hope this helps.


  15. 10-04-2018, 11:03 AM


    #15

    vanderpooldr is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Hit CTRL+F, Options, Format, and ensure the Clear button is grayed out for every tab.


  16. 10-04-2018, 11:20 AM


    #16

    Re: Find (Ctrl + F) and Replace Not Working

    Try searching for 22,577.94


  17. 10-04-2018, 12:26 PM


    #17

    vanderpooldr is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    it works, just type CTRL+F — then 22577.94 —omit the comma


  18. 11-20-2018, 11:03 AM


    #18

    maresrob is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working


  19. 11-20-2018, 11:05 AM


    #19

    maresrob is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working


  20. 02-26-2020, 07:06 AM


    #20

    Ingri is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Hello,

    When I click ctr+f, it highlights the sheet itself, how do I change it to values?

    Thank you,
    Ingrida


  21. 02-26-2020, 07:42 AM


    #21

    Re: Find (Ctrl + F) and Replace Not Working

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see

    Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread


  22. 02-26-2020, 08:38 AM


    #22

    maresrob is offline


    Registered User


    Quote Originally Posted by Ingri
    View Post

    Hello,

    When I click ctr+f, it highlights the sheet itself, how do I change it to values?

    Thank you,
    Ingrida

    Control f does find control a selects all


  23. 04-18-2020, 10:19 AM


    #23

    WisconsinElle is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    This happens to me and I think I finally found a workaround. For whatever reason, if you type the what you’re searching for anywhere on the page, «Find All» is able to find all of the options (not just the new one you typed)

    Good luck! This finally helped me from a very aggravating project. (Especially because I was closing the program after every search, which helped as well).


  24. 11-30-2020, 01:40 PM


    #24

    zakazano is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Quote Originally Posted by vanderpooldr
    View Post

    Hit CTRL+F, Options, Format, and ensure the Clear button is grayed out for every tab.

    Thank you!! This had been driving me nuts!


  25. 05-28-2021, 07:00 PM


    #25

    BryanBecker is offline


    Registered User


    Thumbs up Re: Find (Ctrl + F) and Replace Not Working

    Works like a charm.

    Thanks so much!


  26. 05-28-2021, 09:30 PM


    #26

    Re: Find (Ctrl + F) and Replace Not Working

    Ali, now I understand why Forum Rule #4 is so important.. this whole thread is all jumbled up!


  27. 06-01-2021, 06:13 AM


    #27

    SanjiVinsmoke is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    Here is what I would recommend you to do , check that your search options are set to look in Values, not Formulas. Make sure you don’t have multiple cells selected (otherwise, Search will only look in selected cells). Make sure «Match whole cell» isn’t selected. I hope this helps! Cheers!


  28. 04-07-2022, 10:19 PM


    #28

    Master of Mayhem is offline


    Registered User


    Re: Find (Ctrl + F) and Replace Not Working

    [QUOTE=WisconsinElle;5315894]This happens to me and I think I finally found a workaround. For whatever reason, if you type the what you’re searching for anywhere on the page, «Find All» is able to find all of the options (not just the new one you typed)

    Nothing else here mentioned worked until I found your post. It took me a minute to decipher what you were saying but when I selected all and searched for a different word outside my original selection «Find» started working again. When I returned to my selection and original search phrase it also worked. Thanks very much.


Like this post? Please share to your friends:
  • Find nine personality adjectives in the word square
  • Find next vba word
  • Find new words from one word
  • Find named range in excel
  • Find name of picture in word