now instead of simply cleainmg the destination sheet you can get the next
available row
with wsTarget
targetrow = .Range("65000").End(xlUp).Row +1
end with
"runyan" wrote:
> I have been beating my brains for days and I cannot figure a way to
> write the following Macro.
>
> I have data in the following format in Sheet1:
>
> Date 10/7 10/14 10/21
> Name Project
>
> Bill Mow Lawn 80 90 120
> Dave Rake Leaves 100 50 400
> Susan Weed Shrubs 40 10 12
>
>
> I am trying to write it to Sheet2 like this:
> Date Hours Name Project
> 10/7 80 Bill Mow Lawn
> 10/14 90 Bill Mow Lawn
> 10/21 120 Bill Mow Lawn
> 10/7 100 Dave Rake Leaves
> 10/14 50 Dave Rake Leaves
> 10/21 400 Dave Rake Leaves
> 10/7 40 Susan Weed Shrubs
> 10/14 10 Susan Weed Shrubs
> 10/21 12 Susan Weed Shrubs
>
>
> Essentially, each row in the cross-tab formatted data (Sheet1) , will
> result in many rows in the table format (Sheet2) - one row for each
> date value.
>
> 1. The location of the project and name columns never changes
> 2. The number of people and projects do change (needs to loop through
> and data values ALWAYS start at C3 and D3)
> 3. The location of the data row never changes
> 4. The number of date values do change (nneds to loop through and the
> data values ALWAYS start at E2)
>
>
> I can write a macro that can copy all dates and hours for one
> name/project combination, but I cannot figure a way to successfully
> loop through the source data and append it to the destination data.
>
>
> Any help will be greatly appreciated.
>
> Thanks,
> Runyan
>
>
Bookmarks