+ Reply to Thread
Results 1 to 5 of 5

Is there any way to search a range within a range?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-23-2005
    Posts
    8

    Question Is there any way to search a range within a range?

    Hello

    Okay, I need help! Is there any way to search a range within a range?

    For example, I have a load of data in my worksheet. When I run my macro it takes the best part of 10 minutes beacuse it is so big. So, in trying to cut the time down I plan to limit the range that VB searches when doing For each...Next and If...Then's etc.

    So I've got my overall range which includes all my data, but I now want to be able to search just column B, within the overall range.


    Any hints/tips/methods/help?

    Cheers,
    H

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    Can't you just try Find method?

    It is the fastest in finding

  3. #3
    Registered User
    Join Date
    03-23-2005
    Posts
    8

    Angry

    Nope, can't use the find option because I am going through the column and any cells that have bold font I am deleting the entire row

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    For Each Cell In Range("b:b")

    ...

    ....

    Next

    is this waht you want?

  5. #5
    Registered User
    Join Date
    03-23-2005
    Posts
    8
    No, what I wanted was to select all of the data in column B that was within my range.

    I appreciate the help but I've sinse found out a method that works for me :o)

    range(range("A""), Range("N" & Range("A2").CurrentRegion.Rows.count)).select

    Thanks anyway

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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