Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys, how to make the choice of analogue Pareto indicating % with macro, if it's possible? 😃
Not sure but try like below.
Sub Test
Set Field = ActiveDocument.GetField ("Field_Name")
Percentage = ActiveDocument.Variables("A").getcontent.string
Field.ParetoSelect "RangeSum(Above(Sum(Sales),1,RowNo())) / Sum(Total Sales) <=" & Percentage/100
End Sub
Thank you, but is'not work.
Maybe I made a mistake?
Set Field = ActiveDocument.GetField ("[№ Товар, код]","A_123_v")
Percentage = ActiveDocument.Variables("A").getcontent.string
Field.ParetoSelect "RangeSum(Above(Sum({<[Участвует в ABC]={'Да'}>}[Продажи, руб.]),1,RowNo())) / Sum({<[Участвует в ABC]={'Да'}>}Total [Продажи, руб.]) <=" & Percentage/100
Set Field = ActiveDocument.GetField ("[№ Товар, код]","B_123_v")
Percentage = ActiveDocument.Variables("B").getcontent.string
Field.ParetoSelect "RangeSum(Above(Sum({<[Участвует в ABC]={'Да'}>}[Продажи, руб.]),1,RowNo())) / Sum({<[Участвует в ABC]={'Да'}>}Total [Продажи, руб.]) <=" & Percentage/100
You can check the below attachment for understanding.
I choose 1% and macro select all, why? 😃
You mean test file.? I just checked and it seems to be working fine.
But macro not select % correctly, mb in him is mistake?
Can you show me the screenshot.?