Skip i'r prif gynnwys

Sut i guddio gwall fformiwla anghyson yn Excel?

Fel y dangosir isod y llun, bydd dangosydd gwall gwyrdd yn ymddangos yn y gell pan nad yw'r fformiwla'n cyfateb i batrwm fformiwla celloedd eraill sy'n agos ati. Mewn gwirionedd, gallwch guddio'r gwall fformiwla anghyson hwn. Bydd yr erthygl hon yn dangos dulliau i chi ei gyflawni.

Cuddio gwall fformiwla anghyson sengl gan anwybyddu gwall
Cuddiwch yr holl wallau fformiwla anghyson wrth eu dewis gyda chod VBA


Cuddio gwall fformiwla anghyson sengl gan anwybyddu gwall

Gallwch guddio un gwall fformiwla anghyson bob tro wrth anwybyddu'r gwall yn Excel. Gwnewch fel a ganlyn.

1. Dewiswch y gell sy'n cynnwys y dangosydd gwall rydych chi am ei guddio, yna cliciwch ar y botwm dangos wrth ochr y gell. Gweler y screenshot:

2. Dewiswch Anwybyddu Gwall o'r gwymplen fel y dangosir isod screenshot.

Yna bydd y dangosydd gwall yn cael ei guddio ar unwaith.


Cuddiwch yr holl wallau fformiwla anghyson wrth eu dewis gyda chod VBA

Gall y dull VBA canlynol eich helpu i guddio pob gwall fformiwla anghyson mewn detholiad yn eich taflen waith. Gwnewch fel a ganlyn.

1. Yn y daflen waith, mae angen i chi guddio pob gwall fformiwla anghyson, pwyswch y Alt + F11 allweddi ar yr un pryd i agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

2. Yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, cliciwch Mewnosod > Modiwlau, yna copïwch a gludwch god VBA i mewn i ffenestr y Cod.

Cod VBA: Cuddiwch yr holl wallau fformiwla anghyson yn y daflen waith

Sub HideInconsistentFormulaError()
    Dim xRg As Range, xCell As Range
    Dim xError As Byte
    On Error Resume Next
    Set xRg = Application.InputBox("Please select the range:", "KuTools For Excel", ActiveWindow.RangeSelection.Address, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    For Each xCell In xRg
        If xCell.Errors(xlInconsistentFormula).Value Then
            xCell.Errors(xlInconsistentFormula).Ignore = True
        End If
    Next
End Sub

3. Gwasgwch y F5 allwedd i redeg y cod. Yn y popping up Kutools ar gyfer Excel blwch deialog, dewiswch yr ystod y mae angen i chi guddio'r holl wallau fformiwla anghyson ynddo, ac yna cliciwch ar y OK botwm. Gweler y screenshot:

Yna mae'r holl wallau fformiwla anghyson yn cael eu cuddio ar unwaith o'r ystod a ddewiswyd. Gweler y screenshot:

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 (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello Crystal,

thank you very much for the code, its working now :)


Greets

speedy
This comment was minimized by the moderator on the site
Hello Crystal,

thank you for your testing time.

Do you use a basic old school (user formatted table) only or is it a table with a excel design and filter function in column head ?
Like shown here:
https://support.microsoft.com/de-de/office/%C3%BCbersicht-zu-excel-tabellen-7ab0bb7d-3a9e-4b56-a3c9-6c94334e492c

Latest is what I am using.

I can´t share my "programm" - its a financial tool for personal use.
The cells are with this content:
=HYPERLINK("https://www.domain.de/abc.html";"www")

Because each row has a another link, I´m getting the inconsistent errors.
I can hide it manually, but not with VBA.

I don´t know if your vba just works for a few seconds and then the errors appear again.
This comment was minimized by the moderator on the site
Hi speedy,
Many thanks for your feedback. The original code did not take into account the Table format data. The code has been updated as follows, please give it a try.

Sub HideInconsistentFormulaError()
'Updated by Extendoffice 20220902
    Dim xRg As Range, xCell As Range
    Dim xError As Byte
    On Error Resume Next
   Set xRg = Application.InputBox("Please select the range:", "KuTools For Excel", ActiveWindow.RangeSelection.Address, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    For Each xCell In xRg
        If xCell.Errors(xlEmptyCellReferences).Value Then
            xCell.Errors(xlEmptyCellReferences).Ignore = True
        ElseIf xCell.Errors(xlEvaluateToError).Value Then
            xCell.Errors(xlEvaluateToError).Ignore = True
        ElseIf xCell.Errors(xlInconsistentFormula).Value Then
            xCell.Errors(xlInconsistentFormula).Ignore = True
        ElseIf xCell.Errors(xlInconsistentListFormula).Value Then
            xCell.Errors(xlInconsistentListFormula).Ignore = True
        ElseIf xCell.Errors(xlListDataValidation).Value Then
           xCell.Errors(xlListDataValidation).Ignore = True
        ElseIf xCell.Errors(xlNumberAsText).Value Then
            xCell.Errors(xlNumberAsText).Ignore = True
        ElseIf xCell.Errors(xlOmittedCells).Value Then
            xCell.Errors(xlOmittedCells).Ignore = True
        ElseIf xCell.Errors(xlTextDate).Value Then
            xCell.Errors(xlTextDate).Ignore = True
        ElseIf xCell.Errors(xlUnlockedFormulaCells).Value Then
            xCell.Errors(xlUnlockedFormulaCells).Ignore = True
        End If
    Next
End Sub
This comment was minimized by the moderator on the site
Hello Crystal,

The newest Excel 365 Version 2207 (Build 15427.20210)
This comment was minimized by the moderator on the site
Hi speedy,
I have tested the code in the same version (2207 (Build 15425.20210)) and it stil works.
Can you upload a sample file of your data here?
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/365_version.png
This comment was minimized by the moderator on the site
Hello,

thank you for sharing your solution, but its not working in newest Excel 365
No VBA-Errors, but Excel still shows the inconsistent errors
This comment was minimized by the moderator on the site
Hi speedy,
Can you tell me the version of your Excel 365 you have?
I have tested the code in Excel 365 and it works well. so the problem cannot be reproduced.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations