Skip i'r prif gynnwys

Sut i glirio storfa hidlo (hen eitemau) o Pivot Table yn Excel?

Fel isod llun a ddangosir, rydych chi'n creu Tabl Pivot yn seiliedig ar ystod o ddata. Ar ôl dileu data o'r ystod ffynhonnell, bydd yr hen eitem yn dal i fodoli yn y gwymplen Tabl Pivot er eich bod yn adnewyddu'r Tabl Pivot. Os ydych chi am dynnu pob hen eitem o'r gwymplen Tabl Pivot, gall dulliau yn yr erthygl hon eich helpu chi.

Clirio storfa hidlo (hen eitemau) o Dabl Pivot trwy newid ei opsiwn
Clirio storfa hidlo (hen eitemau) o'r holl Dablau Pivot trwy ddefnyddio cod VBA


Clirio storfa hidlo (hen eitemau) o Dabl Pivot trwy newid ei opsiwn

Gallwch glirio storfa hidlo o Dabl Pivot trwy newid ei opsiwn. Gwnewch fel a ganlyn.

1. Cliciwch ar y dde ar unrhyw gell y tu mewn i'r Tabl Pivot, yna cliciwch Opsiynau PivotTable o'r ddewislen cyd-destun. Gweler y screenshot:

2. Yn y Opsiynau PivotTable blwch deialog, cliciwch y Dyddiad tab, dewiswch Dim oddi wrth y Nifer yr eitemau i'w cadw fesul cae rhestr ostwng, ac yna cliciwch ar y OK botwm.

3. Cliciwch ar y dde ar y gell Pivot Table, yna cliciwch Adnewyddu o'r ddewislen clicio ar y dde. Gweler y screenshot:

Yna gallwch weld bod yr hen eitemau'n cael eu tynnu o'r gwymplen yn y Tabl Pivot fel y dangosir isod y screenshot.


Clirio storfa hidlo (hen eitemau) o'r holl Dablau Pivot trwy ddefnyddio cod VBA

Os ydych chi am glirio storfa hidlo o'r holl Dablau Pivot ar draws sawl taflen waith mewn llyfr gwaith gweithredol. Rhowch gynnig ar y sgript VBA isod.

1. Yn y llyfr gwaith mae angen i chi glirio hen eitemau o'r holl Dablau Pivot, pwyswch y Alt + F11 allweddi ar yr un pryd i agor y Ffenestr Microsoft Visual Basic for Applications.

2. Yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, cliciwch ddwywaith ar y Llyfr Gwaith hwn yn y Prosiect cwarel i agor y Y Llyfr Gwaith hwn (Cod) ffenestr, ac yna copïwch a gludwch y cod VBA isod i'r ffenestr.

Cod VBA: Clirio storfa glir (hen eitemau) o'r holl Dablau Pivot yn y llyfr gwaith gweithredol

Private Sub Workbook_Open()
    Dim xPt As PivotTable
    Dim xWs As Worksheet
    Dim xPc As PivotCache
    Application.ScreenUpdating = False
    For Each xWs In ActiveWorkbook.Worksheets
        For Each xPt In xWs.PivotTables
            xPt.PivotCache.MissingItemsLimit = xlMissingItemsNone
        Next xPt
    Next xWs
    For Each xPc In ActiveWorkbook.PivotCaches
        On Error Resume Next
        xPc.Refresh
    Next xPc
    Application.ScreenUpdating = True
End Sub

3. Gwasgwch y F5 allwedd i redeg y cod, yna mae hen eitemau'n cael eu tynnu ar unwaith o'r gwymplen o'r holl Dablau Pivot yn y llyfr gwaith gweithredol.


Erthyglau perthnasol:

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
Comments (14)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Hola. Muchisimas gracias, tu ejemplo practico me ayudo mucho y logre resolver el incovenienre.
Me fui por la primera opción, desde la tabla dinamica.
Rated 5 out of 5
This comment was minimized by the moderator on the site
I am facing similar cache issue in my pivot tables and charts created using Power Pivot. Will the above two options works for Pivot Tables created using Power Pivot? Please let me know, if you have any other solution for Power Pivots.
This comment was minimized by the moderator on the site
Hi Manikanta,
The methods provided in this post haven't tested in Power Pivots, sorry I can't help you.
This comment was minimized by the moderator on the site
Thank you Crystal, for the reply. Can anyone suggest other forums to get the solution to remove filter catch for Power Pivot.
This comment was minimized by the moderator on the site
Hi Manikanta,
Maybe you can post your question in our forum. You may get help from others there.
https://www.extendoffice.com/forum/categories/3-excel.html
This comment was minimized by the moderator on the site
You are Awesome!!
Thank you.
This comment was minimized by the moderator on the site
Merci beaucoup ! Depuis le temps que je cherchais à effacer ces caches.... ce n'était pas évident à trouver, voire impossible sans votre aide !
This comment was minimized by the moderator on the site
Thank you!!
This comment was minimized by the moderator on the site
Sir, Thank you very much. it works wonderfully. I was annoyed by this problem. Thanx a lot.
This comment was minimized by the moderator on the site
run time error '1004'... it does not work for me..why?
This comment was minimized by the moderator on the site
Hi mark,
Which Excel version are you using?
This comment was minimized by the moderator on the site
it works, thank you
This comment was minimized by the moderator on the site
It worked for me. Thank you!
This comment was minimized by the moderator on the site
I got a pivot of a table where the filter shows an incorrect value. The analyst name is A in the filter (set retain values to none) but if you go to the table, the same line has the analyst B. If you double click on the line in the pivot table it generates a sheet with the data where the analyst name is B despite the pivot showing A. This table is updated once a month, it worries me because I often do this, update my raw data and update the pivot, now that I have this precedent I cannot trust the information is correct.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations