View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Column find code not working correctly

Doug Glancy wrote:
Todd,

Try the analog to what you are doing with finding the last row:

STACKEDLEFT = Worksheets("Location View").Range("IV1").End(xlToLeft).Column

Note that this will find the last used column in Row 1 . . . .


Unless the last used column is Column IV. Slightly more general is,
with Worksheets("Location View") selected as you have shown,

STACKEDLEFT = Range("1:1").Find("*", , , , , xlPrevious).Column

Both will return an error message if the row is empty.

Alan Beban