Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to write VBA code to hide an entire row which contains a single
cell named "MyCell." That is, I don't know which row MyCell" will be in, but whatever row it's in, that's the row I want to hide. The sheet will always be the ActiveSheet. How can I write a line of code that will hide the row that "MyCell" is in? Thanks in advance, Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub hidenamedcellrow()
Range("MyCell").EntireRow.Hidden = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Paul" wrote in message ... I would like to write VBA code to hide an entire row which contains a single cell named "MyCell." That is, I don't know which row MyCell" will be in, but whatever row it's in, that's the row I want to hide. The sheet will always be the ActiveSheet. How can I write a line of code that will hide the row that "MyCell" is in? Thanks in advance, Paul |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cells.Select
Selection.Find(What:="hat", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate ActiveCell.Select Selection.EntireRow.Hidden = True "Paul" wrote: I would like to write VBA code to hide an entire row which contains a single cell named "MyCell." That is, I don't know which row MyCell" will be in, but whatever row it's in, that's the row I want to hide. The sheet will always be the ActiveSheet. How can I write a line of code that will hide the row that "MyCell" is in? Thanks in advance, Paul |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don, dmoney,
Don had it right the first time - the cell in question has the Range name of "MyCell." I tested the suggested solution, "Range("MyCell").EntireRow.Hidden = True" and it works just fine. Thanks so much for responding to my question, and for providing a solultion. Paul |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad to help
-- Don Guillett Microsoft MVP Excel SalesAid Software "Paul" wrote in message ... Don, dmoney, Don had it right the first time - the cell in question has the Range name of "MyCell." I tested the suggested solution, "Range("MyCell").EntireRow.Hidden = True" and it works just fine. Thanks so much for responding to my question, and for providing a solultion. Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Referring a cell | Excel Discussion (Misc queries) | |||
Question regarding referring to different cell Value | Excel Discussion (Misc queries) | |||
From single cell variables to a single column serie | New Users to Excel | |||
Referring to a cell(Newbie) | Excel Programming | |||
Referring to a cell in another sheet | Excel Programming |