LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default VBA searching through range and pasting value if no match is f

Hi

Thanks for your reply, I'm glad that you made it work.

Regards,
Per


On 27 Nov., 16:13, struggler
wrote:
Hi again.
I solved the problem, maby not the best way bit still, it works:
*If f Is Nothing Then
* * * * * * * * * * .Cells(4, 1).End(xlDown).Activate
* * * * * * * * * * ActiveCell.End(xlDown).Activate
* * * * * * * * * * ActiveCell.End(xlUp).Activate
* * * * * * * * * * ActiveCell.Offset(1, 0) = Hold
* * * * * * * * End If

Thanks for your helpPerJessen!!!



"struggler" wrote:
there seems to be a problem, when it finds the "Hold" value then its ok, but
if it does not find the value there is an error:
*If f Is Nothing Then
* * * * * * * * * * .Cells(4, 1).End(xlDown).Offset(1, 0) = Hold
* * * * * * * * End If
Im getting a run-time error. Application-defined or object.defined error.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to match 2 columns, if a match found add info from 2nd column Stratton Excel Worksheet Functions 1 October 8th 08 02:55 PM
Searching for a value for and then replacing when found. [email protected] Excel Programming 4 January 20th 08 05:52 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
Conditional format if cell match found in another range of cells Nolene Excel Worksheet Functions 2 October 5th 06 06:56 AM
Searching for partial text match in range [email protected] Excel Worksheet Functions 3 September 12th 06 05:58 AM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"