Skip to main content

Conas sraitheanna a cheilt bunaithe ar luach cille in Excel?

Má cheaptar go bhfuil raon sonraí agat, agus gur mhaith leat na sraitheanna a cheilt bunaithe ar luach colúin, mar shampla, má tá luach cille an cholúin níos lú ná 3000, ansin cealaigh an tsraith den chill mar atá thíos an pictiúr a thaispeántar.


In Excel, is féidir leat an fheidhm Scagaire a úsáid chun na sraitheanna a scagadh agus a cheilt bunaithe ar luach cille.

1. Roghnaigh na sonraí a theastaíonn uait a scagadh amach, agus cliceáil Dáta > scagairí. Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 2

2. Ansin cliceáil ar an saighead anuas chun an liosta anuas scagaire a thaispeáint, agus cliceáil Scagairí Uimhir (nó Scagairí Téacs) > Níos fearr ná (is féidir leat critéar eile a theastaíonn uait a roghnú ón bhfo-roghchlár). Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 3

3. Sa dialóg popping, clóscríobh an critéar sa bhosca téacs in aice leis níos mó ná. Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 4

4. cliceáil OK. Anois ní thaispeántar ach na sonraí is mó ná 3000, agus tá na sraitheanna a bhfuil a gcuid sonraí níos lú ná 3000 i bhfolach.

sraitheanna seithí doc bunaithe ar luach 5


Thairis sin, má tá suim agat i gcód VBA, anseo is féidir liom cód VBA a thabhairt isteach chun sraitheanna a cheilt bunaithe ar luach cille.

1. Brúigh Alt + F11 eochracha le cumasú Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

2. Ansin cliceáil Ionsáigh > Modúil nua a oscailt Modúil fuinneog, agus greamaigh faoi bhun an chóid VBA isteach ann.

VBA: Folaigh sraitheanna bunaithe ar luach cille.

Sub HideRow()
'Updateby20150618
Dim Rng As Range
Dim WorkRng As Range
Dim xNumber As Integer
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
xNumber = Application.InputBox("Number", xTitleId, "", Type:=1)
For Each Rng In WorkRng
    Rng.EntireRow.Hidden = Rng.Value < xNumber
Next
End Sub

3. Ansin brúigh F5 eochair chun an VBA a rith, ansin roghnaigh an raon sonraí a theastaíonn uait sraitheanna a cheilt sa dialóg popping (gan ceanntásca a áireamh). Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 6

4. cliceáil OK, agus clóscríobh uimhir an chritéir sa dara dialóg. Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 7

5. cliceáil OK. Anois tá na sraitheanna a bhfuil a gcuid sonraí níos lú ná 3000 i bhfolach.

Leid: Más mian leat sraitheanna atá níos mó ná 3000 a cheilt, ní gá ach athrú Rng.EntireRow.Hidden = Rng.Value <xNumber chun Rng.EntireRow.Hidden = Rng.Value> xNumber, nó más mian leat sraitheanna a bhfuil a gcuid sonraí cothrom le 3000 a cheilt, athraigh go Rng.EntireRow.Hidden = Rng.Value = xNumber.


Roghnaigh cealla go tapa bunaithe ar chritéir in Excel

Le Kutools le haghaidh Excel's Roghnaigh Cealla Sonracha, is féidir leat cealla a roghnú bunaithe ar chritéar nó dhó uair amháin. 
roghnaigh cealla ar leith
 
Kutools for Excel: le níos mó ná 300 breiseán áisiúil Excel, saor in aisce le triail gan aon teorannú i 30 lá.

MÁ nach maith leat feidhm Scagaire a chumasú, ná le VBA, tugann mé uirlis áisiúil duit anseo - Roghnaigh Cealla Sonracha of Kutools le haghaidh Excel chun sraitheanna iomlána a roghnú go tapa bunaithe ar luach cille, ansin is féidir leat iad a cheilt.

Kutools le haghaidh Excel, le níos mó ná 300 feidhmeanna úsáideacha, déanann sé do phoist níos éasca. 

Tar éis suiteáil saor in aisce Kutools for Excel, déan mar atá thíos le do thoil:

Leid. Más mian leat triail saor in aisce a fháil ar an bhfeidhm Sliocht Téacs, téigh chuig Kutools le haghaidh Excel saor in aisce ar dtús, agus ansin téigh chun an oibríocht a chur i bhfeidhm de réir na gcéimeanna thuas.

1. Roghnaigh an raon sonraí agus cliceáil Kutools > Roghnaigh > Roghnaigh Cealla Sonracha. Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 14

2. Sa Roghnaigh Cealla Sonracha dialóg, seiceáil Sraith iomlán faoi Cineál roghnúcháin alt, ansin roghnaigh an critéar a theastaíonn uait Cineál sonrach liosta, ansin clóscríobh an uimhir nó an téacs sa bhosca téacs. Féach an pictiúr:

sraitheanna seithí doc bunaithe ar luach 9

3. cliceáil Ok > OK dialóga a dhúnadh. Anois roghnaítear na sraitheanna a bhfuil a gcuid sonraí níos lú ná 3000, agus ní gá duit ach cliceáil ar dheis ag ceanntásc an tsraith chun an roghchlár comhthéacs a thaispeáint, agus cliceáil Folaigh. Féach an pictiúr:
sraitheanna seithí doc bunaithe ar luach 10

Anois tá na sraitheanna a bhfuil a gcuid sonraí níos lú ná 3000 i bhfolach.

sraitheanna seithí doc bunaithe ar luach 11

Leid:

1. Más mian leat sraitheanna a cheilt a bhfuil luach áirithe orthu, is féidir leat a roghnú agus clóscríobh an luach áirithe sa bhosca téacs.

sraitheanna seithí doc bunaithe ar luach 12

2. Más mian leat sraitheanna a cheilt lena n-áirítear luach níos mó ná luachanna ach níos lú, is féidir leat a roghnú Níos fearr ná agus Níos lú ná, ansin clóscríobh na luachanna sa dá bhosca, agus seiceáil agus.

sraitheanna seithí doc bunaithe ar luach 13

Le Kutools le haghaidh Excel's Roghnaigh Cealla Sonracha fóntais, is féidir leat suíomh sonrach cealla a aithint, sraitheanna nó colúin iomlána a roghnú bunaithe ar luach cille agus mar sin de. Cliceáil anseo chun níos mó eolais a fháil faoin bhfóntas seo.

Kutools for Excel: 300+ feidhm a chaithfidh a bheith agat in Excel, Triail saor in aisce 30 lá as seo.

Uirlisí Táirgiúlachta Oifige is Fearr

🤖 Kutools AI Aide: anailís sonraí a réabhlóidiú bunaithe ar: Forghníomhú Chliste   |  Gin Cód  |  Cruthaigh Foirmlí Saincheaptha  |  Anailís a dhéanamh ar Sonraí agus Cairteacha a Ghin  |  Feidhmeanna Kutools a agairt...
Gnéithe Coitianta: Faigh, Aibhsigh nó Aithnigh Dúblaigh   |  Scrios Sraitheanna Bána   |  Comhcheangail Colúin nó Cealla gan Sonraí a Chailleadh   |   Babhta gan Foirmle ...
Cuardaigh Super: Ilchritéir VLookup    VLookup Illuachanna  |   VLookup Trasna Ilbhileoga   |   Amharc doiléir ....
Liosta anuas Casta: Go tapa Cruthaigh Liosta Anuas   |  Liosta anuas Cleithiúnach   |  Liosta Buail Isteach Ilroghnacha ....
Bainisteoir Colún: Cuir Líon Sonrach Colún leis  |  Colúin Bog  |  Scoránaigh Stádas Infheictheachta na gColún Ceilte  |  Déan comparáid idir Raonta & Colúin ...
Gnéithe Réadmhaoin: Fócas Eangaí   |  Amharc Dearaidh   |   Barra Mór na Foirmle    Leabhar Oibre & Bainisteoir Bileog   |  Leabharlann Acmhainní (Uaththéacs)   |  Piocálaí Dáta   |  Comhcheangail Bileoga Oibre   |  Criptigh/Díchriptigh Cealla    Seol Ríomhphost trí Liosta   |  Scagaire Super   |   Scagaire Speisialta (scagaire trom/iodálach/stailc tríd...) ...
Barr 15 Uirlisí12 Téacs uirlisí (Cuir Téacs, Bain Carachtair,...)   |   50 + Cairt cineálacha (Cairt Gantt,...)   |   40+ Praiticiúil Foirmlí (Ríomh aois bunaithe ar lá breithe,...)   |   19 Insertion uirlisí (Cuir isteach Cód QR, Ionsáigh Pictiúr ón gCosán,...)   |   12 Tiontú uirlisí (Uimhreacha le Focail, Comhshó Airgeadra,...)   |   7 Cumaisc & Scoilt uirlisí (Sraitheanna Comhcheangail Casta, Cealla Scoilt,...)   |   ... agus eile

Supercharge Do Scileanna Excel le Kutools le haghaidh Excel, agus Éifeachtúlacht Taithí Cosúil Ná Roimhe. Kutools le haghaidh Excel Tairiscintí Níos mó ná 300 Ardghnéithe chun Táirgiúlacht a Treisiú agus Sábháil Am.  Cliceáil anseo chun an ghné is mó a theastaíonn uait a fháil ...

Tuairisc


Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair i bhfad Níos Éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Yes, "Entire Row" is selected.
This comment was minimized by the moderator on the site
All rows remain selected without using Kutools. As soon as I use Kutools and select header row, all other rows but the header row de-select.
This comment was minimized by the moderator on the site
Are you sure check the Entire row option in the dialog? If you check cell option, the selected cells will be unselected when you right click at one row.
https://www.extendoffice.com/images/stories/comments/sun-comment/doc-select-specific-cell-1.png
This comment was minimized by the moderator on the site
Hi - I'm using a newer Lenovo PC with Windows 10 Professional and Microsoft 365 Apps for business. Excel Version 2210 (Build 15726.20202 Click-to-Run).
This comment was minimized by the moderator on the site
I have tried the operation in the same version with you, there is no any problem. Could you try to manually select several rows (without using Kutools for Excel), then right click at one row header, see all rows are remained selecting?
This comment was minimized by the moderator on the site
I have done exactly what you've demonstrated. However, when I right-click on the row header, all other rows become de-selected and only that one row remains selected to be hidden or deleted. No matter what I do, the other rows do not stay selected when right-clicking on the header. I'm at a loss to know what to do now.
This comment was minimized by the moderator on the site
I am so sorry for that. Could you tell me what Excel version and system you use?
This comment was minimized by the moderator on the site
Hello,

That is exactly what I've been doing, however, it only hides the row on which I have clicked the row header. All other selected rows remain unhidden, and are deselected at the same time. I will try it again following your gif exactly. Thanks for your reply.
This comment was minimized by the moderator on the site
I'm using Kutools to select entire rows based on a value, and it does select all the rows with that value. However, when I right-click on the row header and click on "Hide" in the menu, only that row is hidden and the rest that were selected become de-selected. It appears I still have to hide each row one at a time. What am I doing wrong?
This comment was minimized by the moderator on the site
Hi, Rochelley, I think there may be some wrong when you right-click at the row header. After the rows which match your condition are selecetd after applying the feature, right click at one row header of them, note that other rows are kept selected, then choose hide from the context menu. Please see the gif:
https://www.extendoffice.com/images/stories/comments/sun-comment/doc-hide-selected-row.gif
This comment was minimized by the moderator on the site
Hello,

I have a drop down with multiple reponses. I am trying to hide certain rows dependant on the response, can someone please assist?

Dropdown options are "CDI", "AR", "Legal", "Multiple" and "Other".

If response is CDI then hide rows 42-100

If response is AR then hide rows 19-41 and rows 66-100

If response is Legal then hide rows 19-66 and rows 88-100

If response is multiple then don't hide anything

If response is Other then hide rows 19-88



Can someone please asssist?
This comment was minimized by the moderator on the site
Hi I need some help with my work sheet. I have to build a dynamic questionnaire and I need to have a code that allow me to hide/ Unhide automatically some rows base on a cell information. Example:

if c6 is "internally" then show me row 7 but hide 8 to 107
if c6 is "Externally" then hide all the rows from 7 to 107


if c7 is "yes" then show me row 8 but hide 9 to 107
if c7 is "No" then show me row 8 but hide 9 to 107
if c8 is "Critical" then show me row 9 but hide 10 to 107

if c8 is "Important" show me row 9 but hide 10 to 107
if c8 is "Ordinary" show me row 9 but hide 10 to 107
if c8 is "Other" then show me row 9 but hide 10 to 107

if c9 is "Critical" then show me row 10 but hide 11 to 107
if c9 is "Important" then show me row 10 but hide 11 to 107
if c9 is "Ordinary" then show me row 10 but hide 11 to 107
if c9 is "Other" then show me row 10 but hide 11 to 107

etc.

can somebody help me?
This comment was minimized by the moderator on the site
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Row = 1 Then

If Target.Value = "YES" Then
Worksheets(2).Activate
Worksheets(2).Application.Columns("A:Z").Select
Worksheets(2).Application.Selection.EntireColumn.Hidden = True
Worksheets(2).Application.Columns("AA:AZ").Select
Worksheets(2).Application.Selection.EntireColumn.Hidden = False
ElseIf Target.Value = "NO" Then
Worksheets(2).Activate
Worksheets(2).Application.Columns("AA:AZ").Select
Worksheets(2).Application.Selection.EntireColumn.Hidden = True
Worksheets(2).Application.Columns("A:Z").Select
Worksheets(2).Application.Selection.EntireColumn.Hidden = False
Else
Worksheets(2).Activate
Worksheets(2).Application.Columns("A:Z").Select
Worksheets(2).Application.Selection.EntireColumn.Hidden = False
Worksheets(2).Application.Columns("AA:AZ").Select
Worksheets(2).Application.Selection.EntireColumn.Hidden = False
End If

End If
End Sub
This comment was minimized by the moderator on the site
I got same error
This comment was minimized by the moderator on the site
Sorry I do not know either.
This comment was minimized by the moderator on the site
I don't know either Sunny
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations