Excel Macro to copy cells in a col based on another cell

Microsoft Office excel 2007 - upgrade
January 18, 2012 at 10:02:35
Specs: Windows XP
Need some help sorting a large data output to different sheets based on Column A value, seems like this should be easier than what I am doing but I can't get it to work

Data coming in example

       A             C                      H              I
4   Dept        Product Code             Sch #             Prod #
5   DeptA
6   DeptA        101                        12             12
7   DeptA        102                        34             33
8   DeptB
9   DeptB        201                        10             11 
10  DeptB        103                        23             25
11  DeptB        301                        45             40

I want to copy this data to
Existing Sheet Named "DeptA"

       A                         C              E       
3    Prod Code                 Sch#           Prod#
4    101                       12                12
5    102                       34                33

and then same thing for "DeptB" sheet
       A                      C              E       
3     Prod Code              Sch#           Prod#
4      201                    10             11 
5      103                    23             25
6      301                    45             40


They can be kept in current order, if Product Code is blank skip to next line, if Sch # is blank skip to the next line, copy Prod# whether it is empty or not

Thanks


See More: Excel Macro to copy cells in a col based on another cell

Report •


#1
January 18, 2012 at 11:31:44
Please click on the following line and then repost your example data after reading the instructions found via that link.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question