View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Help with Debra Dalgleish's Code

Do you have any duplicated headers in your data? If you do, change them so each
header is unique.

wrote:

On Feb 17, 5:19 pm, Dave Peterson wrote:
Try stepping through the code. After each "major" step, go back to excel and
look to see if things look ok.

When you process a line that screws up the data, you'll know what's causing the
trouble.





wrote:

On Feb 16, 7:23 pm, Dave Peterson wrote:
If you create a new test worksheet--brand new and populate it with test data,
does the routine work ok?


wrote:


<<snipped


Hi Debra,
Yes I do, when I run the macro that time I have only Main and
Customers only...and when the individual sheets are created data from
Columns C & D is
repeated from columns F & G respectively. This is what is going
wrong.
Thanks for your time and helpRashidKhan- Hide quoted text -


- Show quoted text -


Sorry a typo in the previous post...Data from C and D is repeated in F
and G respectively...
Thanks


--


Dave Peterson- Hide quoted text -


- Show quoted text -


Hello Dave,
I created a brand new worksheet and run the code..
Unfortunately same result is given


Thanks for your time
RashidKhan


--

Dave Peterson- Hide quoted text -

- Show quoted text -


Hello Dave,
I run the routine and following lines is giving problem:

If rsp = 6 Then
myDatabase.AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=TempWks.Range("D1:D2"), _
CopyToRange:=wks.Range("A1").Offset(i, 0), _
Unique:=False
Else
myDatabase.AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=TempWks.Range("D1:D2"), _
CopyToRange:=wks.Range("A1"), _
Unique:=False
End If
When the above code is run the data from Columns C & D is repeated in
Columns F & G respectively on the individual sheets.
Thanks for your time and assistance

Rashid Khan


--

Dave Peterson