Forum

Velouria
@debaser
Moderator
Member
Joined: Nov 1, 2018
Last seen: May 22, 2025
Topics: 0 / Replies: 838
Reply
RE: Multiplying given value based on number of months

Date.Month(somedate) will return the month number to be used in your calculation.

3 years ago
Forum
Reply
RE: Is there anything like Min/Max for numbers in PQ

You could also do something like: Text.Start(<txt>, List.Max({0,Text.Length(<txt>)-1}))) Just bear in mind that you are likely ...

3 years ago
Forum
Reply
RE: Line Chart showing up as dots and not lines

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...

3 years ago
Reply
RE: Automatically Create Slicers

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...

3 years ago
Forum
Reply
RE: Automatically Create Slicers

That is the line where you needed the Set: Set myPTSettings.ObjRef = pto

3 years ago
Forum
Reply
RE: Vlookup the the total number from one tab to another

If you do need a formula, you can use SUMIF: =SUMIF(Sheet2!B:B,"Americas",Sheet2!C:C) for example.

3 years ago
Reply
RE: Automatically Create Slicers

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...

3 years ago
Forum
Reply
RE: Automatically Create Slicers

You need to pass a pivot table object, not its name.

3 years ago
Forum
Reply
RE: Invalid Forward Reference

Hi Kathy, Glad it was useful to you. 🙂

3 years ago
Forum
Reply
RE: Macro to open file with password protecion

Not from personal experience, I'm afraid.

3 years ago
Forum
Reply
RE: Any ideas how to sort a table (.ListObjects(1)) by column 3, then by column 4?

You could shorten to: With ActiveWorkbook.ActiveSheet.ListObjects(1) .Range.Sort Key1:=.ListColumns(3), Key2:=.ListColumns(4), Header:=xlYes End Wi...

3 years ago
Forum
Reply
RE: Does anyone know what causes or restricts parameter prompts in VBA?

So nothing if you type Application.WorksheetFunction then a dot?

3 years ago
Forum
Reply
RE: Macro to open file with password protecion

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.

3 years ago
Forum
Reply
RE: Does anyone know what causes or restricts parameter prompts in VBA?

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...

3 years ago
Forum
Reply
RE: Is it possible to just exclude a value from a filter without specifying all the other values that are included?

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: ...

3 years ago
Forum
Page 24 / 56