Find "X" (Only one value?)
LookupValue = "X"
With Worksheets(1).Range("a1:z500")
Set c = .Find(LookupValue, LookIn:=xlValues)
If Not c Is Nothing Then
xRow=C.row
End If
End With
Select Range:
Dim Rng as range
Set rng=range(Cells(xrow,zcol),Cells(yrow,ycol))
rng.select
HTH
" wrote:
Hello,
I am trying to figure out a VB script for Excel macro in order to do
the following:
- determine row # where a particular word exists - make this target_row
- select range of cells from a specific cell (say B2000) to column L &
target_row
example:
1 1 1 1 1
2 2 2 2 2
3 3 x 3 z
4 4 4 4 4
5 5 5 5 5
6 y 6 6 6
determine row where "x" exists - row # 3
select range from y to z - B6 <- E3
y - row/column known
x,z - column known
I think I am having more trouble with the code used to select the range
rather than finding the row?