Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How can I use VB to hide Row 57 if cell A53 has a value of 1?

I have a pricing worksheet. If the person filling it out populates the QTY
field (cell A53) of the item in row 53 with a value of 1, then I want the
item in row 57 to "disappear", so it can't be selected also. Is there a VB
code I can use to accomplish this?

Thanks for your time!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default How can I use VB to hide Row 57 if cell A53 has a value of 1?

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$53" Then Rows(57).Hidden = (Target.Value = 1)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dorothy" wrote:

I have a pricing worksheet. If the person filling it out populates the QTY
field (cell A53) of the item in row 53 with a value of 1, then I want the
item in row 57 to "disappear", so it can't be selected also. Is there a VB
code I can use to accomplish this?

Thanks for your time!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How can I use VB to hide Row 57 if cell A53 has a value of 1?

Worked perfectly. Thanks!!

"Jacob Skaria" wrote:

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$53" Then Rows(57).Hidden = (Target.Value = 1)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dorothy" wrote:

I have a pricing worksheet. If the person filling it out populates the QTY
field (cell A53) of the item in row 53 with a value of 1, then I want the
item in row 57 to "disappear", so it can't be selected also. Is there a VB
code I can use to accomplish this?

Thanks for your time!

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
How can I change the size of a cell and hide what is in the cell? Elisabeth Excel Worksheet Functions 7 January 3rd 08 07:43 PM
auto-hide rows, cell format (# and @), update cell refs, shade cel Mo2 Excel Discussion (Misc queries) 0 April 17th 07 03:44 AM
Hide cell values based on a condition in another cell Cat Excel Worksheet Functions 1 January 4th 07 07:21 AM
How to hide a particular cell....... PSL Excel Discussion (Misc queries) 1 July 18th 06 01:24 PM
Hide Value of Cell Mark Excel Discussion (Misc queries) 1 December 23rd 04 05:51 PM


All times are GMT +1. The time now is 01:45 AM.

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"