#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find


Hi.

I want to find a number in "Worksheets(3)" in Range("A1:AE1000")
The number is the number in cell: Range("Blad1!A17")
Then i want to move 1 cell to the right and copy and paste....

If the number in Worksheets(3) dont exist the kod from "Else" is ok
but if the number exist there is wrong in raw
c.Select

can you help me?
I try to do like this...

Dallas


Sub findkomb()

Set c = Worksheets(3).Range("A1:AE1000").Find(What:=Range( "Blad1!A17"),
LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
c.Select

ActiveCell.Offset(0, 1).Select
Selection.Copy

Sheets("Blad1").Select
ActiveSheet.Unprotect Password:="xxxxxx"
Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect Password:="xxxxxx"

Else

Sheets("Blad1").Select
ActiveSheet.Unprotect Password:="xxxxxx"
Range("B2") = "00000!"
ActiveSheet.Protect Password:="xxxxxx"
End If

End Sub


--
dallas


------------------------------------------------------------------------
dallas's Profile: http://www.excelforum.com/member.php...o&userid=10040
View this thread: http://www.excelforum.com/showthread...hreadid=345991

Reply
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
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
find and delete duplicate entries in two columns or find and prin. campare 2 columns of numbers-find unique Excel Programming 1 November 24th 04 04:09 PM
find and delete text, find a 10-digit number and put it in a textbox Paul Excel Programming 3 November 16th 04 04:21 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 03:55 PM.

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

About Us

"It's about Microsoft Excel"