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 301851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:02:38+00:00 2026-05-12T07:02:38+00:00

I have an HTML report that can be opened in Excel. I have written

  • 0

I have an HTML report that can be opened in Excel. I have written macros to format this report so it is sortable and can have filters applied.

I am trying to grab text between slashes. The report size, how many rows, is unknown.

Column A is blank. Column B will contain the full path name. IF column B is populated, column C should have the text between the slashes.

For example, column B contains R:\testdocuments\test.html. I want column C to contain testdocuments.

Code I have for column C:

Range("C9").Select
ActiveCell.FormulaR1C1 = _
    "=MID(RC[-1], FIND(""\"",RC[-1])+1, FIND(""\"",RC[-1], FIND(""\"",RC[-1])+1)-FIND(""\"",RC[-1])-1)"
Range("C9").Select
    Selection.AutoFill Destination:=Range("C9:C65000"), Type:=xlFillDefault
Range("C9:C20000").Select

This is not effective because it takes forever to sort/filter anything.

How can I check if column B is populated and if it is, to populate C with the text between slashes for the ability to filter by directory?

  • 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-12T07:02:38+00:00Added an answer on May 12, 2026 at 7:02 am

    First of all, a few general tips:

    1. When writing macros, you can work with Ranges without selecting them.
    2. Use the following code at the beginning of your macro to prevent the application from animating (which slows it down): Application.ScreenUpdating = False

      Edit: Make sure and set it back to ‘True’ after you’re done.

    3. Instead of Range("C9:C65000"), you can actually let Excel find the last row for you using Range("A1").SpecialCells(xlCellTypeLastCell).Row.

    So, the macro might look something like this:

    Sub FillFormulas()
        Dim row As Integer
        Application.ScreenUpdating = False
        row = Range("B9").SpecialCells(xlCellTypeLastCell).row
        Range("C9").Formula = "=MID(B9, FIND(""\"",B9)+1, FIND(""\"",B9, FIND(""\"",B9)+1)-FIND(""\"",B9)-1)"
        Range(Range("C9"), Range("C" & row)).FillDown
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a HTML based report that can be variable lengths and number of
I have this small testcase: http://jsfiddle.net/sV8js/ You can see that in Chrome (tested on
I have a web application written in PHP with many reports in HTML format.
I have an HTML report, with each print page contained by a <div class=page>
I have HTML view using 2010 .NET, which I am generating in the report
I have a small, custom crafted HTML report, not using any reporting engine, for
I have html code like this <tr class=odd> <td><b>Reason for Termination:</b></td> <td>this has bunch
I have HTML like this: <a href=# class=modalInput glow rel=#newsletter >Newsletter!</a> This opens a
Does anyone have any suggestions for a good tool, xslt or other that can
I have an HTML form that takes inputted data and sends it via the

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.