getrapt filteren :)

littlepete

Well-known Member
Joined
Mar 26, 2015
Messages
503
Office Version
  1. 365
Platform
  1. Windows
hallo :)
in mijn kolom a heb ik een indeling staan:
1.
1.1.
...
14.5.3.6
...
18.3.2.3.4.5
...

het lukt mij om elk onderdeel op te slaan in level1, level2, level3 ...
wat mij niet lukt is het filteren: hij filtert wel op het eerste niveau, maar niet op de volgende...
mijn idee is te werken met een hulpkolom:
filteren op niveau 1, markeren; filter wissen;
filteren op niveau 2, en zo voort :) ...
ik vraag me af waar de fout zit ? ik heb immers copy paste gedaan en enkel de juiste levels aangepast ...
dit is wat ik heb:


ActiveSheet.Range("rngindeling").AutoFilter Field:=1
Selection.AutoFilter Field:=Range("rngindeling").Cells(2, 1).Column, _
Criteria1:=levelx, Operator:=xlAnd
Set rngfound = Cells.Find(levelx, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False)
MsgBox "levelx is hier : " & levelx
markeer
toonselectie
MsgBox "niveau 1"
' ===============================================================
ActiveSheet.Range("rngindeling").AutoFilter Field:=1
Selection.AutoFilter Field:=Range("rngindeling").Cells(2, 1).Column, _
Criteria1:=level1, Operator:=xlAnd
Set rngfound = Cells.Find(level1, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False)
MsgBox "levelx is hier : " & level1
markeer
toonselectie
MsgBox "niveau 2"
If aantalnivos > 2 Then GoTo resultaat
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
guys...
i'm waiting for help ... what do i need to do to get faster answers ? :( ...
 
Upvote 0
guys...
i'm waiting for help ... what do i need to do to get faster answers ? :( ...


For example:

… 1) see here…

http://www.mrexcel.com/forum/about-...nswers-my-mostly-probably-easy-questions.html

.. 2) … for example Code in Code Tags…many of the best people here prefer to see the code in them


Code:
ActiveSheet.Range("rngindeling").AutoFilter Field:=1
Selection.AutoFilter Field:=Range("rngindeling").Cells(2, 1).Column, _
Criteria1:=levelx, Operator:=xlAnd
Set rngfound = Cells.Find(levelx, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False)
MsgBox "levelx is hier : " & levelx
markeer
toonselectie
MsgBox "niveau 1"
' ===============================================================
ActiveSheet.Range("rngindeling").AutoFilter Field:=1
Selection.AutoFilter Field:=Range("rngindeling").Cells(2, 1).Column, _
Criteria1:=level1, Operator:=xlAnd
Set rngfound = Cells.Find(level1, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False)
MsgBox "levelx is hier : " & level1
markeer
toonselectie
MsgBox "niveau 2"
If aantalnivos > 2 Then GoTo resultaat

… I do sympathies. But you only waited an hour before replying to yourself and asking again for help, (Which is called “Bumping” ) ( : So you lost the chance of someone picking the Thread up as a zero reply Thread. – Some regulars start their day by checking out zero reply Threads..
…so

.. 3) Do not “Bump” too soon. From my experience, a regular will often still pick up a Zero reply Thread after 1 to 2 days. Not always. But remember everyone works voluntarily here.

(.. 3b) Note – you do not have to Bump as quickly anyway in the Foreign Language Sub Forum as you do in the others, as things move slower here and so your Thread stays “visible” longer )

. Sorry I cannot help more. ( But by replying I have at least “Bumped your Thread again” )

Alan.
 
Upvote 0
Hallo

Ik kom hier de laatste tijd enkel om eens te kijken hoe het gaat op het forum en wat mijn "vrienden MrExcel MVP's" posten.
Toevallig zag ik iets in 't Nederlands en "Leuven"... Dus 'k ga er mij toch eens even mee bezig houden :)

Je vraag kan duidelijk worden, als je een voorbeeld stuurt in 2 delen:
1. hoe je sheet er oorsronkelijk uitziet
2. wat je wil bekomen nadat je de code gerund hebt
Daarbij ook even uitleggen wat de logica is achter de zaak.

beste groeten
Erik
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,953
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top