Hi

Try this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, c As Range
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A16:A50")) Is Nothing Then
Set rng = Range("A16:A150")
For Each c In rng
    If c.Value = "" Then
        c.EntireRow.Hidden = True
        Else
        c.EntireRow.Hidden = False
    End If
Next
End If
End Sub



however you will be required to work with ..Workbook_SheetChange

Cheers!!

+++++
*I did not do this for you. God is here working through me for you.*

On Mon, Dec 29, 2014 at 5:32 PM, Ashish Bhalara <ashishbhalar...@gmail.com>
wrote:

> Dear experts,
>
> Kindly see below code to hide row if cell value is blank. I need looping
> in this code to apply this code from row 16 to 50. Thanks in advance.
>
>  Private Sub Worksheet_Change(ByVal Target As Range)      If
> Range("A16").Value = "" Then          Rows("16:16").EntireRow.Hidden =
> True      ElseIf Range("A16").Value <> "" Then
> Rows("16:16").EntireRow.Hidden = False      End If  End Sub
>
>
> Regards.
> Ashish Bhalara
> 9624111822
> P*Please do not print this email unless it is absolutely necessary.
> Spread environmental üawareness.♣♣♣*
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to