Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Hiding Rows Without Using VBA

Hi everyone,

Can you do something like:

In a cell such as F1, can you type thing like: If B1=1, then hide row 1?

If there is no way but using VBA, what such a code should look like?

Regards,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default Hiding Rows Without Using VBA

Assuming you are in row 1, the VBA could be
If Range("B1") = 1 Then
ActiveCell.EntireRow.Hidden = True
End If

Ed

"Michael" wrote in message
om...
Hi everyone,

Can you do something like:

In a cell such as F1, can you type thing like: If B1=1, then hide row 1?

If there is no way but using VBA, what such a code should look like?

Regards,
Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Hiding Rows Without Using VBA

Try this

If ActiveSheet.Range("B1").Value = 1 Then

ActiveSheet.Rows("1").Hidden = False

Else

End If

Best of luck
DavidC
-----Original Message-----
Hi everyone,

Can you do something like:

In a cell such as F1, can you type thing like: If B1=1,

then hide row 1?

If there is no way but using VBA, what such a code should

look like?

Regards,
Mike
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Hiding Rows Without Using VBA

"DavidC" wrote in message ...
Try this

If ActiveSheet.Range("B1").Value = 1 Then

ActiveSheet.Rows("1").Hidden = False

Else

End If

Best of luck
DavidC
-----Original Message-----
Hi everyone,

Can you do something like:

In a cell such as F1, can you type thing like: If B1=1,

then hide row 1?

If there is no way but using VBA, what such a code should

look like?

Regards,
Mike
.



I am using this but not working:

Set rngBlock = Workbooks(filename).Worksheets("ParetoTable").Rang e("B10:B59")

For Each rngCell In rngBlock
If rngCell.Value < 1 Then
ActiveCell.EntireRow.Hidden = True
End If
Next rngCell

It gives no error but not hiding anything? Anything wrong please?

Regards,
Mike
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding Rows Without Using VBA

You can only hide entire rows or columns. That is why your script doe
not work

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Hiding Rows Without Using VBA


Okay, but if the range is NOT known in advance and you have to go row by
row, check, and decide row-by-row, how the above VBA piece of code can
be modified to do so?

Regards,
Mike


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Copying Rows when hiding other rows Neutron1871 Excel Worksheet Functions 2 November 3rd 04 11:38 PM


All times are GMT +1. The time now is 06:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"