+ Reply to Thread
Results 1 to 11 of 11

How to use IsEMPTY in for-next loop?

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    How to use IsEMPTY in for-next loop?

    Hello. I need to hide entire row 4 if H4 is empty, then row 5 if H5 is empty and so forth. I use the code below, but I guess I've got problem with IsEmpty(i, 8).. Any idea?
    Please Login or Register  to view this content.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: How to use IsEMPTY in for-next loop?

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: How to use IsEMPTY in for-next loop?

    Try this..

    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to use IsEMPTY in for-next loop?

    @Hi Sixthsense, works like a charm. How would you do the same to hide if #N/A? Cheers

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to use IsEMPTY in for-next loop?

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to use IsEMPTY in for-next loop?

    @Debraj - unfortunately this line: "If Cells(i, 8) = vbNullString Then" makes problems..

  7. #7
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: How to use IsEMPTY in for-next loop?

    Here's yet another, though similar way of doing the same using the LEN function:

    Please Login or Register  to view this content.
    HTH

    Robert
    Last edited by Trebor76; 09-02-2013 at 07:26 AM.
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to use IsEMPTY in for-next loop?

    Please Login or Register  to view this content.

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: How to use IsEMPTY in for-next loop?

    Try this...

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to use IsEMPTY in for-next loop?

    @Robert/AB33; thanks for adding: Application.ScreenUpdating = False and then True ... it helps though I've got less than 500 rows

  11. #11
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to use IsEMPTY in for-next loop?

    You're awesome , thanks everyone

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Not isempty()
    By nikko50 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2013, 01:19 PM
  2. Using ISNA and ISEMPTY together
    By briggsy1300 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2013, 07:50 AM
  3. isempty loop
    By comp23 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2012, 03:32 PM
  4. Isempty problems
    By ajc5382 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2012, 11:03 PM
  5. IsEmpty
    By Determined in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-05-2007, 07:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1