Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi!
I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Any cell?
Rows(5).Hidden = Application.Countif(Rows(5),0) 0 or a specific cell? Rows(5).Hidden = Range("M5") .value = 0 -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... Hi! I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I want the macro to go thru the hole worksheet row by row.
If the cell e3,e4 and so on are zero the row should be hidden. "Bob Phillips" skrev: Any cell? Rows(5).Hidden = Application.Countif(Rows(5),0) 0 or a specific cell? Rows(5).Hidden = Range("M5") .value = 0 -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... Hi! I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Ted,
Try this: Sub hiderow() Dim whichrng As Range Set whichrng = Range("A1:A10") 'adjust range to your needs! For Each cell In whichrng If cell = 0 And Not IsEmpty(cell) Then Rows(cell.Row).Hidden = True End If Next cell End Sub Regards, Srefi €˛Ted€¯ ezt Ć*rta: Hi! I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() For i = 1 To Cells(Rows.Count,"E").End(xlUp).Row Rows(i).Hidden = Cells(i,"E").Value = 0 Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... I want the macro to go thru the hole worksheet row by row. If the cell e3,e4 and so on are zero the row should be hidden. "Bob Phillips" skrev: Any cell? Rows(5).Hidden = Application.Countif(Rows(5),0) 0 or a specific cell? Rows(5).Hidden = Range("M5") .value = 0 -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... Hi! I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That should be
For i = 1 To Cells(Rows.Count, "E").End(xlUp).Row Rows(i).Hidden = Cells(i, "E").Value = 0 And _ Not IsEmpty(Cells(i, "E").Value) Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... I want the macro to go thru the hole worksheet row by row. If the cell e3,e4 and so on are zero the row should be hidden. "Bob Phillips" skrev: Any cell? Rows(5).Hidden = Application.Countif(Rows(5),0) 0 or a specific cell? Rows(5).Hidden = Range("M5") .value = 0 -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... Hi! I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Many thanks Bob!
Your answer really helped me out. Regards Ted "Bob Phillips" skrev: That should be For i = 1 To Cells(Rows.Count, "E").End(xlUp).Row Rows(i).Hidden = Cells(i, "E").Value = 0 And _ Not IsEmpty(Cells(i, "E").Value) Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... I want the macro to go thru the hole worksheet row by row. If the cell e3,e4 and so on are zero the row should be hidden. "Bob Phillips" skrev: Any cell? Rows(5).Hidden = Application.Countif(Rows(5),0) 0 or a specific cell? Rows(5).Hidden = Range("M5") .value = 0 -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ted" wrote in message ... Hi! I want to make a macro that hides the hole row if a cell in that row has the value 0 (zero). Dont know how to do that. Can anyone help me with a tip how to accomplish this. :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop excel from dropping the 0 in the beginning of a number? | Setting up and Configuration of Excel | |||
Open Excel 2003 from Windows Explorer | Excel Discussion (Misc queries) | |||
Need suggestions for some uses of Ms Excel | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) |