View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Set the copy to column to a variable

Hi again Claus,

https://www.dropbox.com/s/wvfcp4mwa4...pBox.xlsm?dl=0

Having trouble with my code. Some comments on the sheet FBAout.

There are two (and sometimes three) columns on the search sheets (all the sheets except FBAout) that the code is to find the "scanned" entry in cell A5 and return to the proper header on FBAout and data stamp in the adjacent column.

I had previous code doing that perfectly, except there was the concern that the lookup range was dependent on the column length of column A on the search sheet. Whereas, column A could be only a few rows and other columns could be many, many rows. So if the lookup value was in a longer column than A, then it would be "Not Found".

I installed some code you previously wrote which finds the longest column within the columns search range, A B C in this case, and I cannot find what my error is.

It just doesn't look in the search sheet??

Its a 50 + sheet workbook, but using only sheet "CN1" as the search sheet will be enough to straighten out my mistaken code.

Thanks for taking a look.

Howard