Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The folowing code was supplied by Dave Paterson....Many
Thanks I Can only get this code to work when I replace "sheet1" with the actual sheet tab name ie "BOM Summary file1" As the "sheet tab name" changes for each job / file why shouldn't "Sheet1" overide the tab name???? Am I doing something wrong??? Option Explicit Sub testme01() Dim FoundCell As Range Dim FirstAddress As String Dim FindWhat As String FindWhat = "109000" With Worksheets("sheet1").Range("a:a") Set FoundCell = .Cells.Find(what:=FindWhat, _ after:=.Cells(.Cells.Count), _ LookIn:=xlFormulas, lookat:=xlWhole) If FoundCell Is Nothing Then 'do nothing Else FirstAddress = FoundCell.Address Do FoundCell.Offset(0, 1).Value = 0 Set FoundCell = .FindNext(FoundCell) Loop While Not FoundCell Is Nothing _ And FoundCell.Address < FirstAddress End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup with part match | Excel Worksheet Functions | |||
Dave phlogiston appears in spreadsheet cell when I type Dave P | Excel Discussion (Misc queries) | |||
Part of VLOOKUP not working | Excel Worksheet Functions | |||
Question for dave Paterson | Excel Discussion (Misc queries) | |||
Vlookup for part of a word | Excel Worksheet Functions |