Hi

I am modifying the inventory master report from Partner BIC. In the VBA, the filtered data is as follows:

 

Sub FilterData()
'
' FilterData Macro
' Macro recorded 2003/06/08
'

'
    Sheets("Filtered").Select
    Range("A1:AI2").Select
    Sheets("Sheet1").Columns("A:AI").AdvancedFilter Action:=xlFilterCopy, _
        CriteriaRange:=Range("AL1:AM3"), CopyToRange:=Range("A1:AI1"), Unique:=False
    Range("A1").Select
    Sheets("Inventory Master").Select
End Sub

 

I need this part to change to include two more columns - currently it is selecting A:AI - I need A:AL to be copied over...

 

Can someone please help? (ps, but just changing the letters, it doesn't change and it then gives me range name issues.  i've checked for range names - can't pick up a range resembling the above.

 

 

Views: 167

Reply to This

Replies to This Discussion

Hi Marilize: I think your issue is the name of the Sheets ("Sheet1").Column.  Is this the correct sheet name, or should it be the Filtered sheet.

 

Did you try the Macro recorder to see if it would help?

 

Ted Simms

HI Ted

I am still very green with Macro's - the function of this macro is to copy what is on sheet one and then to filter it on sheet 3. It unfortunately only copies until column AI on sheet one and I need it to copy up to column AK...

Does it make sense?

Have you got any suggestions...?

 

Marilize: I would have to have the program and run it to see what the issue is.  However, one thing to try is to break down what the macro does into individual steps i.e. selecting a sheet, selecting a range, turning on the advanced filter, copying the output, and pasting it on the inventory worksheet.

Do these actions manually with the macro recorder on.  It will record a macro (albeit a cluttered one) that may show you what you need to do.

 

Good luck.

 

Ted

RSS

The Sage Intelligence Blog

Like Sage Intelligence?

Follow @SageSupport

© 2019   Created by Sage Alchemex.   Powered by

Badges  |  Report an Issue  |  Terms of Service