Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 920251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:40:55+00:00 2026-05-15T18:40:55+00:00

I have used the Find_Range function from OzGrid which returns a Range object with

  • 0

I have used the Find_Range function from OzGrid which returns a Range object with the found items. It have used it successfully. I know that looping through each item of the resultant Range allows for updates/modifications to the individual cells. The Count property shows the right value.

There is no Value property and the Value2 property only shows the first item found.

My question is – What is the property in the result of Find_Range ( which is a range of non-contiguous cells) that lists all the found items?

Edit:

A bit more clarity – Generally a Range object such as the ffg can provide a Variant array of all the selected items in a Range

   Dim selRange as Range
   Dim vals as Variant 
   Set selRange = Range("A1:B10")
   vals = selRange.Value // 2D array with all values from the range

However,

   Set selRange = Range("A1,A2,B10") // this is similar to the result of the Find-Range Function
   vals = selRange.Value // will only provide the value of A1 and not all three

Function Find_Range(Find_Item As Variant, _ 
    Search_Range As Range, _ 
    Optional LookIn As Variant, _ 
    Optional LookAt As Variant, _ 
    Optional MatchCase As Boolean) As Range 

    Dim c As Range 
    If IsMissing(LookIn) Then LookIn = xlValues 'xlFormulas
    If IsMissing(LookAt) Then LookAt = xlPart 'xlWhole
    If IsMissing(MatchCase) Then MatchCase = False 

    With Search_Range 
        Set c = .Find( _ 
        What:=Find_Item, _ 
        LookIn:=LookIn, _ 
        LookAt:=LookAt, _ 
        SearchOrder:=xlByRows, _ 
        SearchDirection:=xlNext, _ 
        MatchCase:=MatchCase, _ 
        SearchFormat:=False) 
        If Not c Is Nothing Then 
            Set Find_Range = c 
            firstAddress = c.Address 
            Do 
                Set Find_Range = Union(Find_Range, c) 
                Set c = .FindNext(c) 
            Loop While Not c Is Nothing And c.Address <> firstAddress 
        End If 
    End With 

End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:40:56+00:00Added an answer on May 15, 2026 at 6:40 pm

    Not 100% sure what you mean, but enumerating the results seems to work:

    Dim searchTerm As String
    searchTerm = "Search word"
    
    Dim results As Excel.Range
    Set results = Find_Range(Find_Item:=searchTerm, Search_Range:=ActiveSheet.Cells)
    
    If Not results Is Nothing Then
    
        Dim cell As Excel.Range
        For Each cell In results
            Debug.Print cell.Value
        Next cell
    
    End If
    

    When you enumerate the results in the For Each loop, it implicitly calls the Range object’s .Cells-property, so

    For Each cell In results
    

    is the same as

    For Each cell In results.Cells
    

    Because the Find_Range returns a range of multiple cells, there is no single property that can give the results as a list. You have to loop through the range and build the list yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 524k
  • Answers 524k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's not really a jQuery thing, it's a YClass thing.… May 16, 2026 at 9:52 pm
  • Editorial Team
    Editorial Team added an answer Looks like an old question, but I just ran into… May 16, 2026 at 9:52 pm
  • Editorial Team
    Editorial Team added an answer Are you loading the image file to QImage and then… May 16, 2026 at 9:52 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

From this question here , I was writing an enum wrapper to have some
I have a set of data protected by 16bit checksums that I need to
I have used KD-tree(libkdtree++) to store a multi-dimensional data set, and the requirements here
Hi I have the following query running a function to get the Standard Deviation
I have used auto properties a lot but I have gone more and more
I have used Stata and gVim on Windows for a while now. Recently I
I have a model called NoteCategory, which is functioning as a join table between
Summary: I have a struct that is read/written to file. This struct changes frequently,
I have got myself saddled with an existing application - which attempts do do
How can I find out the properties and methods of COM objects returned from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.