View Single Post
  #22   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Copy Application.Union(c.Offset(0, 1), c.Offset(0, 2)... to a list on same & another sheet

Just want to emphasize that using defined name for the search string

col doesn't break your code...



Dim lSearchStrCol&

lSearchStrCol = Range("SearchStrings").Column

LRow = .Cells(.Rows.Count, lSearchStrCol).End(xlUp).Row



OR



LRow = .Cells(.Rows.Count,
Range("SearchStrings").Column).End(xlUp).Row



..because Excel will always know where it is!



--

Garry



Okay, I think a little light is making its way into my head here.

So I would name the column (or the range within the column)
"SearchStrings"?

And if I move the column of strings from A to G like I did here, I
would just change the range reference of the name "SearchStrings" in
the Name Manager?

Howard


No! Excel will automagically update the ref for you!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion