+ Reply to Thread
Results 1 to 2 of 2

Multiple Ranges issue

  1. #1
    Registered User
    Join Date
    09-08-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    45

    Multiple Ranges issue

    Hello,

    I am having issues with the following code:

    Please Login or Register  to view this content.
    fRange is not working, the first 2 loops work but not this one. I cannot get it to work.

    Could someone help me with this please?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Multiple Ranges issue

    Try changing the Ands to Ors.

    Incidentally looping through ranges of cells can be extremely slow and inefficient. For this sort of thing it's much more efficient and elegant to use an Autofilter to show the cells you want to delete, and then use the

    fRange.SpecialCells(xlCellTypeVisible).EntireRow.Delete

    This only requires VBA to address the sheet once rather than jumping back and forth
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Getting into Pivot Tables - Having issue with Multiple Ranges
    By Karroog in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-21-2016, 10:13 AM
  2. Replies: 11
    Last Post: 06-30-2016, 07:07 PM
  3. SUMPRODUCT Issue - Need to calculate weighted average of multiple ranges
    By arcobalt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-01-2012, 04:55 PM
  4. Replies: 6
    Last Post: 10-30-2012, 02:35 PM
  5. Replies: 0
    Last Post: 10-15-2012, 07:24 AM
  6. [SOLVED] Issue in Name Ranges
    By sandiptemkar in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 09-08-2012, 01:04 PM
  7. Multiple Named Ranges Pasting Loop issue
    By pacman_d in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-13-2010, 09:46 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