![]() |
hide rows with macro
I want makro which can find out which cells are empty in area a12:a35 and
hide those rows where cells are empty. |
hide rows with macro
"Alen32" wrote:
I want makro which can find out which cells are empty in area a12:a35 and hide those rows where cells are empty. One way:- Sub HideRows() For a = 12 To 35 If Cells(a, 1) = "" Then Cells(a, 1).Select Selection.EntireRow.Hidden = True End If Next a End Sub |
hide rows with macro
doesn't work.
|
hide rows with macro
"Alen32" wrote:
doesn't work. Should do. I trust you copied the lines into a new module ( Alt+F11InsertModule ) |
hide rows with macro
it works in some sheets but dosn't work in some others sheets. I don't know
why |
hide rows with macro
Depends on whether the cells are empty or contain a space, I guess
|
hide rows with macro
how to remove space?
|
hide rows with macro
Sub HideRows()
Dim cell as String Dim a as Long For a = 12 To 35 cell = Application.Substitute(Cells(a,1).Text,chr(160),"" ) If Trim(cell) = "" Then Cells(a, 1).EntireRow.Hidden = True End If Next a End Sub -- Regards, Tom Ogilvy "Alen32" wrote in message lkaboutsoftware.com... how to remove space? |
hide rows with macro
thanks!
|
All times are GMT +1. The time now is 05:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com