Your the MAN Tom:
Thanks, I think I'm getting there
SkipC
----- Tom Ogilvy wrote: -----
for each cell in Activesheet.Range("B9:B200") ' range with products/colored
select Case cell.Interior.ColorIndex
case 1
' company 1, copy this cell and 4 to the right to
' the next blank cell in column C above row 50; C3
' would have a header like "Product", so the first
' cell colored 1 in Column B starting with row 9
' will be copied to C4
Cell.Resize(1,5).copy Destination:=Worksheets( _
"company1").Cells(50,"C").End(xlup)(2)
case 2
' send to Company 2
Cell.Resize(1,5).copy Destination:=Worksheets( _
"company2").Cells(50,"C").End(xlup)(2)
case 3
' send to company 3
Cell.Resize(1,5).copy Destination:=Worksheets( _
"company3").Cells(50,"C").End(xlup)(2)
case else
end Select
Next
So you loop down column b starting in Cell B9 and determine the colorindex
for the cell, then use that in the case statement to figure out where to
copy it. As written it copies the cells for that row in columns B to F and
puts them in the product listing portion of the Company Invoice sheet for
the color coded company
See Excel VBA help for color index for the color index numbers and
corresponding colors from the default palette.