Try to search your question here, if you can't find : Ask Any Question Now ?

Unable to get the subtotal property of the worksheet function class

HomeCategory: stackoverflowUnable to get the subtotal property of the worksheet function class
craig asked 2 weeks ago

I’m receiving an error while executing my code.The reason i understand is when the filter of invoices submitted valued above 100k is done, lets say in this case we don’t have any invoices submitted, in the system i’ve set it as “not delivered to customer”. So, in this case how can the system take out the average days from the 2 invoices , above 100k and where both are not submitted. Screenshot of the code is below;

ws_Main.Range(“O2″ & LcolMaster).AutoFilter Field:=15, Criteria1:=”>100000″, Operator:=xlAnd, Criteria2:=”<=3000000″

'On Error Resume Next

DFC = Round(Application.WorksheetFunction.Subtotal(101, ws_Main.Columns(4)), 2)
DLF = Round(Application.WorksheetFunction.Subtotal(101, ws_Main.Columns(5)), 2)
NIV = Application.WorksheetFunction.Subtotal(3, ws_Main.Columns(15)) - 1
NID = Application.WorksheetFunction.Subtotal(102, ws_Main.Columns(4)) - 1
NRDN = Application.WorksheetFunction.Subtotal(3, ws_Main.Columns(16))
NDI = Round(Application.WorksheetFunction.Subtotal(101, ws_Main.Columns(8)), 2)

ws_Dashboard.Range("B6") = DFC & " Days"
ws_Dashboard.Range("B5") = DLF & " Days"
ws_Dashboard.Range("B3") = NIV
ws_Dashboard.Range("B4") = NID
ws_Dashboard.Range("B12") = NRDN
ws_Dashboard.Range("B8") = NDI
1 Answers
Best Answer
Matthias answered 2 weeks ago
Your Answer

1 + 2 =

Popular Tags

WP Facebook Auto Publish Powered By :