Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la dernière
cellule ???
Merci !
JC
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la dernière
cellule ???
Merci !
JC
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la dernière
cellule ???
Merci !
JC
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la dernière
cellule ???
Merci !
JC
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la dernière
cellule ???
Merci !
JC
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de
news:O%23IBEE1jEHA.2692@TK2MSFTNGP12.phx.gbl...
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
Salut
sans vba, enregistrer le classeur
en vba, activesheet.usedrange
a+
rural thierry
"Jean-Claude" a écrit dans le message de news:
O#Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
Salut
sans vba, enregistrer le classeur
en vba, activesheet.usedrange
a+
rural thierry
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de news:
O#IBEE1jEHA.2692@TK2MSFTNGP12.phx.gbl...
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
Salut
sans vba, enregistrer le classeur
en vba, activesheet.usedrange
a+
rural thierry
"Jean-Claude" a écrit dans le message de news:
O#Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de
news:O%23IBEE1jEHA.2692@TK2MSFTNGP12.phx.gbl...
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de
news:O%23IBEE1jEHA.2692@TK2MSFTNGP12.phx.gbl...
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
Hélas !
La macro de Laurent n'a d'effet que sur la 1ère feuille !!
J'arrive pas à la modifier pour toutes les feuille du classeur !!
Help !!
JC
"...Patrick" <http://cerbermail.com/?KPW0tTCjFw> a écrit dans le message
de
news: eR9#assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre
feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernièrecellule ???
Merci !
JC
Hélas !
La macro de Laurent n'a d'effet que sur la 1ère feuille !!
J'arrive pas à la modifier pour toutes les feuille du classeur !!
Help !!
JC
"...Patrick" <http://cerbermail.com/?KPW0tTCjFw> a écrit dans le message
de
news: eR9#OW1jEHA.1404@TK2MSFTNGP09.phx.gbl...
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de
news:O%23IBEE1jEHA.2692@TK2MSFTNGP12.phx.gbl...
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre
feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
Hélas !
La macro de Laurent n'a d'effet que sur la 1ère feuille !!
J'arrive pas à la modifier pour toutes les feuille du classeur !!
Help !!
JC
"...Patrick" <http://cerbermail.com/?KPW0tTCjFw> a écrit dans le message
de
news: eR9#assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns, xlPrevious)(,
2)If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la nouvelle
dernière cellule utilisée (sans faire une copier/coller autre
feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernièrecellule ???
Merci !
JC
elle fonctionne chez moi !
"Jean-Claude" a écrit dans le message de
news:Hélas !
La macro de Laurent n'a d'effet que sur la 1ère feuille !!
J'arrive pas à la modifier pour toutes les feuille du classeur !!
Help !!
JC
"...Patrick" <http://cerbermail.com/?KPW0tTCjFw> a écrit dans le message
denews: eR9#assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns,
xlPrevious)(,
2)If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la
nouvelle
dernière cellule utilisée (sans faire une copier/coller autre
feuille..etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernièrecellule ???
Merci !
JC
elle fonctionne chez moi !
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de
news:udN7tX2jEHA.1764@TK2MSFTNGP10.phx.gbl...
Hélas !
La macro de Laurent n'a d'effet que sur la 1ère feuille !!
J'arrive pas à la modifier pour toutes les feuille du classeur !!
Help !!
JC
"...Patrick" <http://cerbermail.com/?KPW0tTCjFw> a écrit dans le message
de
news: eR9#OW1jEHA.1404@TK2MSFTNGP09.phx.gbl...
assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns,
xlPrevious)(,
2)
If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" <The.Best@Netcourrier.com> a écrit dans le message de
news:O%23IBEE1jEHA.2692@TK2MSFTNGP12.phx.gbl...
Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la
nouvelle
dernière cellule utilisée (sans faire une copier/coller autre
feuille..
etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernière
cellule ???
Merci !
JC
elle fonctionne chez moi !
"Jean-Claude" a écrit dans le message de
news:Hélas !
La macro de Laurent n'a d'effet que sur la 1ère feuille !!
J'arrive pas à la modifier pour toutes les feuille du classeur !!
Help !!
JC
"...Patrick" <http://cerbermail.com/?KPW0tTCjFw> a écrit dans le message
denews: eR9#assez radical et venant d'un "maitre" :
Sub NettoieEtDerniereCellule() ' Laurent Longre
Dim Sht As Worksheet, DCell As Range, Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours..."
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", , , , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)).EntireRow.Clear
Set DCell = Nothing
Set DCell = Sht.Cells.Find("*", , , , xlByColumns,
xlPrevious)(,
2)If Not DCell Is Nothing Then _
Sht.Range(DCell, Sht.[IV1]).EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
End Sub
--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel
"Jean-Claude" a écrit dans le message de
news:O%Bonjour à toutes et tous !
Probablement maintes fois expliqué mais bon...
Quand je fais CTRL+Fin, j'atteind la dernière cellule utilisé...
Mais après suppression de ligne/colonne, comment redéfinir la
nouvelle
dernière cellule utilisée (sans faire une copier/coller autre
feuille..etc...)
Si c'est possible !! Bien sùr !!!
Et en VBA ?? C'est possible d'automatiser la 'redéfinition' de la
dernièrecellule ???
Merci !
JC