VBA - Excel : Suppression onglet suivant date
Résolu/Fermé
bthenault
Messages postés
55
Date d'inscription
mercredi 22 juillet 2009
Statut
Membre
Dernière intervention
8 juin 2011
-
5 mai 2011 à 13:59
bthenault Messages postés 55 Date d'inscription mercredi 22 juillet 2009 Statut Membre Dernière intervention 8 juin 2011 - 11 mai 2011 à 08:05
bthenault Messages postés 55 Date d'inscription mercredi 22 juillet 2009 Statut Membre Dernière intervention 8 juin 2011 - 11 mai 2011 à 08:05
A voir également:
- VBA - Excel : Suppression onglet suivant date
- Liste déroulante excel - Guide
- Word et excel gratuit - Guide
- Si et excel - Guide
- Déplacer une colonne excel - Guide
- Excel compter cellule couleur sans vba - Guide
1 réponse
melanie1324
Messages postés
1504
Date d'inscription
vendredi 25 mai 2007
Statut
Membre
Dernière intervention
31 janvier 2018
155
10 mai 2011 à 13:56
10 mai 2011 à 13:56
Bonjour,
je ne sais pas si c'est plus simple mais voici ma proposition :
For Each Sheet In Workbooks("1er Trimestre 2011.xls").Worksheets
If Sheet.Range("G3") < Date - 8 or Weekday(Sheet.Range("G3"), 2) <> 1 Then
cells(60000,1).select
ActiveCell.FormulaR1C1 = "=FIN.MOIS(R3C7,0)"
if Sheet.Range("G3")) = selection then
Sheet.Delete
end if
weekday : donne le numéro de jour d'une date
je ne sais pas si c'est plus simple mais voici ma proposition :
For Each Sheet In Workbooks("1er Trimestre 2011.xls").Worksheets
If Sheet.Range("G3") < Date - 8 or Weekday(Sheet.Range("G3"), 2) <> 1 Then
cells(60000,1).select
ActiveCell.FormulaR1C1 = "=FIN.MOIS(R3C7,0)"
if Sheet.Range("G3")) = selection then
Sheet.Delete
end if
weekday : donne le numéro de jour d'une date
10 mai 2011 à 14:04
For Each Sheet In Workbooks("1er Trimestre 2011.xls").Worksheets
If Sheet.Range("G3") < Date - 8 or Weekday(Sheet.Range("G3"), 2) <> 1 Then
cells(60000,1).select
ActiveCell.FormulaR1C1 = "=FIN.MOIS(R3C7,0)"
if Sheet.Range("G3")) <> selection then
Sheet.Delete
end if
11 mai 2011 à 08:05