View Single Post
  #3   Report Post  
Hywel
 
Posts: n/a
Default Export data to sheets based on value


My initial example (that you built the code upon) was a simplification.
In reality I amended your code so that instead of colummn B being the
one under question, it is actually column s - this is only a minor
tweak. Column S contains department numbers of the following format
(Letter, Letter, number, number, number, number, e.g. AF0075 or
CP1006)

Using your code this has worked successfully for a number of months.
However, the need has now arisen to divide the information in Column M
of the spreadsheet by unique contents.

If I wanted to interrogate column M of the spreadsheet, the code
doesn't work if i simply adjust the column in question from S to M. I
think this is becuase the format of column M is number, number, number
e.g 145 or 296 etc. I have tried the code on column R (letter format)
and that work - hence my suspicion why it must be the number format.

The row Sheets(dept).select in sub_check_sheet is highlighted in the
debugger.

Is this problem being created due to the format of the contents of the
column being different, or have I missed something far simpler?
Many thanks,
Hywel


--
Hywel
------------------------------------------------------------------------
Hywel's Profile: http://www.excelforum.com/member.php...o&userid=14824
View this thread: http://www.excelforum.com/showthread...hreadid=357226