Last seen: Jun 11, 2026
Why do you have 8 different Case statements in ClearForm that do basically the same thing? A simple solution to your issue would be to add the...
Your workbook didn't attach...
This is still unnecessary: If slc.Name = strSlicerName Then Set slc = ActiveWorkbook.SlicerCaches(slc.Index): Exit For slc already is the slicer...
Date.Month(somedate) will return the month number to be used in your calculation.
You could also do something like: Text.Start(<txt>, List.Max({0,Text.Length(<txt>)-1}))) Just bear in mind that you are likely ...
What lines are you expecting to see? You appear to have three separate series with only one data point in each, so there are no lines to draw - that's...
Just a quick note re your other code: 1. Goto statements are generally best avoided (other than error handling). If you feel you need one, 99% of t...
That is the line where you needed the Set: Set myPTSettings.ObjRef = pto
If you do need a formula, you can use SUMIF: =SUMIF(Sheet2!B:B,"Americas",Sheet2!C:C) for example.
It's an object variable so you need to use Set when assigning it. You should really declare it as a PivotTable in the UDT though rather than a generic...
You need to pass a pivot table object, not its name.
Hi Kathy, Glad it was useful to you. 🙂
Not from personal experience, I'm afraid.
You could shorten to: With ActiveWorkbook.ActiveSheet.ListObjects(1) .Range.Sort Key1:=.ListColumns(3), Key2:=.ListColumns(4), Header:=xlYes End Wi...
So nothing if you type Application.WorksheetFunction then a dot?