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

  • SEARCH
  • Home
  • 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 8113845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:57:48+00:00 2026-06-06T02:57:48+00:00

This question stems off another post I had. (see Search through column in excel

  • 0

This question stems off another post I had. (see Search through column in excel for specific strings where the string is random in each cell)

Workbook example

Using the above image as reference, I am trying to search through column B (actually over 1000 lines) using column E as the “lookup values.” The end goal would be for “just” the names to be displayed in column C. The trick is all the randomly generated characters the encompass the names. Below is what I would want the datasheet to look like. A formula or module should work, but the vlookup and other lookup function I can’t get to work.

enter image description here

  • 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-06-06T02:57:50+00:00Added an answer on June 6, 2026 at 2:57 am

    Another possibility, which may be easier to understand then assylias post initially, but also may be a bit more time consumptive (although with 1,000 rows, I don’t think it will matter much) is below.

    This requires that you name the range in column E as myNames (or whatever name you wish, just update the code – alternatively, you cuold just write Range(“E1:E6”)). Also, if you move the random values from column B, update that in the code as well.

    Sub findString()
    
    Dim celString As Range, rngString As Range, celSearch As Range, rngSearch As Range
    Dim wks As Worksheet
    
    Set wks = Sheets("Sheet1") 'change sheet reference to whatever your sheet name is
    
    Set rngString = wks.Range("myNames")
    Set rngSearch = Intersect(wks.UsedRange, wks.Range("B1").EntireColumn)
    
    For Each celString In rngString
        For Each celSearch In rngSearch
            If InStr(1, celSearch.Text, celString.Value) > 0 Then
                celSearch.Offset(, 1) = celString.Value
            End If
        Next
    Next
    
    End Sub
    

    Since, I worked on your original question as well, I would suggest getting the counts through Siddharth’s answer and then running this, or assylias’s code above to get the names next to the columns. You could put a button the sheet, or just use the Macro dialog box to run the macro.

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

Sidebar

Related Questions

This question stems from Hartl's Rails Tutorial (progressed in chapter 9) - sorry if
Background I admit, this question stems from an ultimate lack of deep understanding of
This stems from a previous question I asked - about a write conflict with
time for another off the wall question. I am writing an MD2 loader for
First off, this question is not what does the constructor property do? - There's
In fact, this is the same question as this post: How can I make
I know this question is really open-ended. Recently migrated from one server to another
This user asked a similar question but had no viable solution in the answers,
First off, apologies if this question has been asked before but I couldn't find
Update : I just stumbled upon this in Eric Lippert's answer to another question

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.