+ Reply to Thread
Results 1 to 3 of 3

Finding a character after two BREAKS

  1. #1
    Registered User
    Join Date
    05-27-2020
    Location
    Clermont, FL
    MS-Off Ver
    2019
    Posts
    3

    Finding a character after two BREAKS

    I need to find the first instance of a Character > ASCII(64) AFTER <br><br> (<br><br> can be replaced with any uncommon character).
    I have a column in Excel that includes ingredients and Instructions without any break codes. I need to separate these two into individual columns.

    Sample Cell:
    Serves/Yields 6 to 8 appetizer servings <br><br>2 tablespoons firmly packed brown sugar<br>2 tablespoons coarsely chopped pecans or almonds<br>1 1/2 teaspoons brandy, (or other liqueur - I used Kahlua)<br>1 firm-ripe whole brie cheese (8 ounce)<br>Crackers<br>Apple and pear slices <br><br>Stir together the brown sugar, chopped pecans and brandy. <br><br>Place cheese in a baking dish just slightly larger than the width of the cheese. Bake in a 425 degree F oven just until cheese begins to soften in the center, about 6 minutes. <br><br>Evenly sprinkle sugar mixture over cheese. Bake until sugar melts and cheese is melted in center (cut to test), 3 to 5 minutes longer. Scoop hot cheese onto crackers and apple/pear slices to eat.</p>


    I need to find the first occurrence of a double break with a LETTER following not a number. In the sample above STIR is the break point between ingredients and instructions.

    So I need something like FIND <BR>+<BR>+CHAR(65) OR GREATER

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Finding a character after two BREAKS

    This has been open for a while. Two solutions come to mind.

    First, is to use SUBSTITUTE to replace all of the <br># instances with something like 'aa'. It would be important to replace the <br># with something that is the same length (i.e. 2 characters). Wrap all of that around a FIND command to find the <br><br> pair. Tedious, but it should work. As an example, with the original string in A1, I am using 'z' as your <br> character, and I only did the numbers 0 to 1; you would need to expand it to be 0 to 9.
    =FIND("zz",SUBSTITUTE(SUBSTITUTE(A1,"z0","aa"),"z1","aa"))+2

    Second is to go into VBA and use some regular expressions. If you want to go that route, then I'd recommend you post to the VBA forum.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Finding a character after two BREAKS

    Data at A3

    Please try at A4
    =TRIM(MID(SUBSTITUTE(A3,"<br><br>",REPT(" ",LEN(A3))),MATCH(TRUE,INDEX(CODE(TRIM(MID(SUBSTITUTE(A3,"<br><br>",REPT(" ",LEN(A3))),ROW(A1:A9)*LEN(A3),LEN(A3))))>64,),)*LEN(A3),LEN(A3)))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding page breaks in excel sheets & inserting empty row
    By Ouka in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2015, 09:54 PM
  2. Replies: 7
    Last Post: 08-13-2013, 03:40 PM
  3. finding nth character in a text
    By hk4kim in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2013, 12:54 PM
  4. Finding first character in a row of characters
    By barneyrubble1965 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-27-2013, 10:45 AM
  5. Finding n'th character in a cell
    By Rinocerinho in forum Excel General
    Replies: 4
    Last Post: 07-22-2012, 05:42 AM
  6. Macro To Add Page Breaks after Character
    By tenk283 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2010, 11:23 PM
  7. Finding word breaks when using Left/Mid/Right functions
    By districter in forum Excel General
    Replies: 2
    Last Post: 05-27-2010, 01:07 AM

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