Last seen: May 22, 2025
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?
No it can't. Although Excel's security is not great, the password to open the workbook is the most secure one. You'd need a decryption program.
but Excel does know what the Activesheet is Actually, no it doesn't know. When you are writing the code, the compiler doesn't know what kind of s...
Your existing code used Field:=7 so I used the same. If your table layout might change, then you can get the index from the listcolumn like so: ...