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 have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
I've created a HTML based report that can be variable lengths and number of
I have a third-party app that creates HTML-based reports that I need to display.
Background: we have an application that generates reports from HTML (that may or may
I have HTML that includes symbols such as the Trademark TM as superscript (™).
I have HTML code like this : <div> <a>Link A1</a> <a>Link A2</a> <a>Link A3</a>
I have a HTML page that scrolls up and down (not a lot, but
Does anyone have any suggestions for a good tool, xslt or other that can
I'm an inspector at a machine shop. I have an html report generated by
I have a asp.net page that generates a report. For better or for worse,

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.