Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Privacywetgeving
Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.
x = iRowStart - 1
last = iRowEinde - iRowStart + 1
For x2 = 1 To last
if left("H" & x + x2, 2) = "RM" then
With Selection.Font
.Color = -4165632 'voor RE .Color = -13321973
End With
End If
Next x2
.AutoFilter 5, arr(0), 2, arr(1)
.AutoFilter 6, Blad10.Cells(str, 4) & "*"
sn = .Cells(1).CurrentRegion
ReDim arr2(1 To UBound(sn), 1 To UBound(sn, 2))
For ii = 2 To UBound(sn)
If Not .Rows(ii).Hidden Then
For jj = 1 To sn(ii, 13)
n = n + 1
For j = 1 To UBound(sn, 2)
arr2(n, 1) = sn(ii, 3)
arr2(n, 2) = sn(ii, 9)
arr2(n, 3) = sn(ii, 10)
arr2(n, 8) = sn(ii, 5)
arr2(n, 9) = sn(ii, 13)
c00 = Application.index(sn, 1, 0)
c01 = Replace(Format(twb.Cells(1, 3), "dd-mm-yyyy"), "-", ".")
c02 = Application.Match(c01, c00, 0)
If Not IsError(c02) Then arr2(n, 10) = sn(ii, c02)
arr2(n, 11) = sn(ii, 2)
arr2(n, 13) = sn(ii, 8)
arr2(n, 15) = IIf(arr2(n, 8) = "RE-1", ThisWorkbook.Sheets("systeem").Cells(1, 1).Value, ThisWorkbook.Sheets("systeem").Cells(2, 1).Value)
Next j
' n = n + 1
Next jj
End If
Next ii
'twb.Range("A" & iRowStart + 1).Resize(n, 15) = arr2
twb.Range("A1000").End(xlUp).Offset(1).Resize(n, 15) = arr2
n = 0
Erase arr2
Knap staaltje vakwerk :thumb:
Sub vervolg()
mySheetName = ActiveSheet.Name
With ThisWorkbook.Sheets("Systeem")
.Range("CHEinde").Value = Sheets(mySheetName).Range("A1000").End(xlUp).row
iRowEinde = .Range("CHEinde")
iRowStart = .Range("CHStart")
With ThisWorkbook.Sheets(mySheetName)
.Rows(iRowStart + 1 & ":" & iRowEinde).Rows.Group
[COLOR=#3366ff] For Each cl In [/COLOR][COLOR=#3366cc].Range("O" & iRowStart, "O" & iRowEinde)[/COLOR]
[COLOR=#3366ff] If cl <> "" Then[/COLOR]
[COLOR=#3366ff] Select Case AscW(cl)[/COLOR]
[COLOR=#3366ff] Case 9658[/COLOR]
[COLOR=#3366ff] cl.Font.ColorIndex = 4[/COLOR]
[COLOR=#3366ff] Case 9787[/COLOR]
[COLOR=#3366ff] cl.Font.ColorIndex = 23[/COLOR]
[COLOR=#3366ff] End Select[/COLOR]
[COLOR=#3366ff] End If[/COLOR]
[COLOR=#3366ff] Next cl[/COLOR]
With ThisWorkbook.Sheets("Systeem")
.Range("CHBTRStart").Value = .Range("CHEinde") + 2
iRowStart = .Range("CHBTRStart")
.Range("ColumnHeaderBTR").Copy Sheets(mySheetName).Range("A" & iRowStart)
' Hieronder vult men weer gegevens in via volgend bestandje op tabblad 2, locatie is:
' ChDir "\\Sidmar.be\dfs\Dienst\GROEP\LAD\LPK\Betacel\Projecten"
' Workbooks.Open Filename:="file:\\Sidmar.be\dfs\Dienst\GROEP\LAD\LPK\Betacel\Projecten\planningEXT.xlsx", ReadOnly:=True
' Eerst kijkt men naar de datum, dan naar LKXXX en men schrijft de gegevens weg op de juiste plaats.
' Indien er geen gegevens aanwezig zijn dan melding: "Geen gegevens aanwezig voor Betrouwbaarheidscel" en code verder laten lopen
.Range("CHBTREinde").Value = Sheets(mySheetName).Range("A1000").End(xlUp).row + 2
iRowEinde = .Range("CHBTREinde").Value
With ThisWorkbook.Sheets(mySheetName)
.Rows(iRowStart + 1 & ":" & iRowEinde).Rows.Group
With ThisWorkbook.Sheets("Systeem")
.Range("CHBGEStart") = .Range("CHBTREinde").Value + 2
iRowStart = .Range("CHBGEStart")
.Range("ColumnHeaderBGE").Copy Sheets(mySheetName).Range("A" & iRowStart)
' Hieronder vult men weer gegevens in via volgend bestandje op tabblad 2, locatie is:
' ChDir "\\Sidmar.be\dfs\ORGANISATIE\LAD\GROEP\LPK\Planning\Systeem"
' Workbooks.Open Filename:="file:\\sidmar.be\dfs\Dienst\GROEP\LAD\LPK\Planning\Systeem\Externen.xlsx", ReadOnly:=True
' Eerst kijkt men naar de datum, dan naar LKXXX en men schrijft de gegevens weg op de juiste plaats.
' Indien er geen gegevens aanwezig zijn dan melding dat er "geen gegevens aanwezig voor Externen"en code verder laten lopen
.Range("CHBGEEinde").Value = Sheets(mySheetName).Range("A1000").End(xlUp).row + 2
iRowEinde = .Range("CHBGEEinde")
Rows(iRowStart + 1 & ":" & iRowEinde).Rows.Group
iRowStart = .Range("IBNStart")
Rows(iRowStart - 1 & ":" & iRowEinde + 1).Rows.Group
Range("A" & iRowStart + 4).Select
End With
End With
End With
End With
End With
Application.ScreenUpdating = True
End Sub
Beste HSV,
Het werkt als een liertje :thumb:
Grts Danny.![]()
For Each cl In .Range("H" & iRowStart, "H" & iRowEinde)
If cl <> "" Then
Select Case cl
Case Split(mySheetName, "_")(0)
cl.Offset(, 7).Font.ColorIndex = 23
cl.Offset(, 8).Validation.Delete
cl.Offset(, 8).Validation.Add 3, 1, , "=" & Replace(cl, "-", "_")
Case Split(mySheetName, "_")(1)
cl.Offset(, 7).Font.ColorIndex = 4
cl.Offset(, 8).Validation.Delete
cl.Offset(, 8).Validation.Add 3, 1, , "=" & Replace(cl, "-", "_")
End Select
End If
Next cl
For Each cl In .Range("H" & iRowStart, "H" & iRowEinde)
If cl <> "" Then
cl.Offset(, 8).Validation.Delete
cl.Offset(, 8).Validation.Add 3, 1, , "=" & Replace(cl, "-", "_")
cl.Offset(, 7).Font.ColorIndex = IIf(cl = Split(mySheetName, "_")(0), 23, 4)
End If
Next cl
For Each cl In .Range("H" & iRowStart, "H" & iRowEinde)
If cl <> "" Then
cl.Offset(, 8).Validation.modify 3, 1, , "=" & Replace(cl, "-", "_")
cl.Offset(, 7).Font.ColorIndex = IIf(cl = Split(mySheetName, "_")(0), 23, 4)
End If
Next
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.