Excel: Masquer la ligne si la cellule X est vide
gumao
Posted messages
1
Status
Member
-
eriiic Posted messages 24581 Registration date Status Contributor Last intervention -
eriiic Posted messages 24581 Registration date Status Contributor Last intervention -
Hello,
I am using Excel 2007. I would like Excel to automatically hide the rows of a sheet if the first cell of the row is empty. For example, if cell A1 is empty, hide row 1. I imagine I need to create a macro, but I don't know how to do it, can you please help me? Thank you.
Configuration: Windows XP / Internet Explorer 7.0
I am using Excel 2007. I would like Excel to automatically hide the rows of a sheet if the first cell of the row is empty. For example, if cell A1 is empty, hide row 1. I imagine I need to create a macro, but I don't know how to do it, can you please help me? Thank you.
Configuration: Windows XP / Internet Explorer 7.0
2 answers
-
Hello,
Without macro, using auto filters.....(uncheck Blanks)
Good night
Edit :
Or by macro, without loops:
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
See you later-
-
Hello,
SpecialCells(XlCellType) only allows access to a particular type of cells.
See the list in the help:
XlCellType can be one of these XlCellType constants.
xlCellTypeAllFormatConditions. Cells of any format
xlCellTypeAllValidation. Cells with validation criteria
xlCellTypeBlanks. Empty cells
xlCellTypeComments. Cells containing comments
xlCellTypeConstants. Cells containing constants
xlCellTypeFormulas. Cells containing formulas
xlCellTypeLastCell. Last cell in the used range
xlCellTypeSameFormatConditions. Cells with the same format
xlCellTypeSameValidation. Cells with the same validation criteria
xlCellTypeVisible. All visible cells
You have to make a loop.
eric
-