i have written a macro to extract couple of data from another sheet with
advanced filter

'extracting equity statement
Sheet24.Range("EqtyPDB").AdvancedFilter Action:=xlFilterCopy,
CriteriaRange:=Sheet19.Range( _
"CW1:CX2"), CopyToRange:=Sheet19.Range("CN1:CU1"), Unique:=False


immediately after this line of code i call another extraction out of the
above extraction to extract some unique data from this

Sub exprice()
With Worksheets("Valuation")
    .Range("CP1:CP" & .Range("CP1").End(xlDown).Row).AdvancedFilter _
        xlFilterCopy, , .Range("a14"), True
End With
End Sub


extract of the main code looks like below where i call EQstatement  and
then i Call exprice afterwards. the problem is that exprice does not work,
i tried to figure it out and what i suspected was that one i call
EQstatement, when i call exprice after that the criteria for EQstatement
still remains in the advanced filter as am calling exprice, so the macro
doesnt work, however if i manually go to advanced filter on the data menu
and enter the list range and the copy to range, leaving the criteria range
blank the extraction is perfect however i noticed that the criteria for the
EQstatement is always showing as such when you run the adv filter with the
criteria included it doesnt work,
pls how do i resolve this issue. thanks

Sub equtyVal()
Application.ScreenUpdating = False
Sheet19.Range("A14:k140").Clear

Sheet19.Range("DA2:Dk2").Copy Destination:=Sheet19.Range("A14") 'copy titles
Call EQstatement

If Sheet19.Range("cn2").Value = "" Then
Exit Sub
Else
'extract unique equities
Call exprice
Dim pus As Long

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to