Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there!
Please help me on the following matter. I want to use FIND in order to identify if the text from one cell exists in another spreadsheet. The fact is that I want to test not just one cell, but let's say 300 cells. The code I made runs until one value is not found in the lookup spreadsheet. The message I receive is "object variable or With block variable not set". It is Run-time error '91'. So, if you have any idea how to avoid this message, please let me know... Thanking in advance BL |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you do
cells.find("value").Select and value is not found, you will get that error. A better approach is set rng = cells.find("Value") if not rng is nothing then rng.select else msgbox "Value not found" End if -- Regards, Tom Ogilvy "bl" wrote in message ... Hi there! Please help me on the following matter. I want to use FIND in order to identify if the text from one cell exists in another spreadsheet. The fact is that I want to test not just one cell, but let's say 300 cells. The code I made runs until one value is not found in the lookup spreadsheet. The message I receive is "object variable or With block variable not set". It is Run-time error '91'. So, if you have any idea how to avoid this message, please let me know... Thanking in advance BL |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks a lot for answering. I think I got the idea and I'll fix the problem
Rgds "Tom Ogilvy" wrote: if you do cells.find("value").Select and value is not found, you will get that error. A better approach is set rng = cells.find("Value") if not rng is nothing then rng.select else msgbox "Value not found" End if -- Regards, Tom Ogilvy "bl" wrote in message ... Hi there! Please help me on the following matter. I want to use FIND in order to identify if the text from one cell exists in another spreadsheet. The fact is that I want to test not just one cell, but let's say 300 cells. The code I made runs until one value is not found in the lookup spreadsheet. The message I receive is "object variable or With block variable not set". It is Run-time error '91'. So, if you have any idea how to avoid this message, please let me know... Thanking in advance BL |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps if you posted your code here.
-- Don Guillett SalesAid Software "bl" wrote in message ... Hi there! Please help me on the following matter. I want to use FIND in order to identify if the text from one cell exists in another spreadsheet. The fact is that I want to test not just one cell, but let's say 300 cells. The code I made runs until one value is not found in the lookup spreadsheet. The message I receive is "object variable or With block variable not set". It is Run-time error '91'. So, if you have any idea how to avoid this message, please let me know... Thanking in advance BL |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming | |||
Run-time error '11' & Run-time error '1004' | Excel Programming | |||
Run-time error '11' & Run-time error '1004' | Excel Programming |