Estatefinds
Board Regular
- Joined
- Sep 14, 2015
- Messages
- 169
I have a code that when run it will search for data from one column and searches for its match in numerous other columns; specifically every 8 columns where data is found and it returns the the row on which that matching data is found.
What i need is for someone to help me change the code so it will search in only one column and return the row it is found on.
(code)
sub my search()
For each gcell in Range("g1", range(G65536").End(xlup))
If isempty(cell(gcell.row, 8)) Then
For each c in Range ("Z1:AOOO324597")
I=Application.match(gcell.value, Range(c, Cells(324597, c.column)), 0)
if Not iserror(I) Then
Cells(gcell.row,8)=I
exit for
end if
next
if is empty(cells(gcell.row, 8)) then
cells(gcell.row, 8) ="$#N/A"
end if
end if
next
end sub
What i need is for someone to help me change the code so it will search in only one column and return the row it is found on.
(code)
sub my search()
For each gcell in Range("g1", range(G65536").End(xlup))
If isempty(cell(gcell.row, 8)) Then
For each c in Range ("Z1:AOOO324597")
I=Application.match(gcell.value, Range(c, Cells(324597, c.column)), 0)
if Not iserror(I) Then
Cells(gcell.row,8)=I
exit for
end if
next
if is empty(cells(gcell.row, 8)) then
cells(gcell.row, 8) ="$#N/A"
end if
end if
next
end sub