Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
find and delete duplicate entries in two columns or find and prin. | Excel Programming | |||
find and delete text, find a 10-digit number and put it in a textbox | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |