+ Reply to Thread
Results 1 to 8 of 8

Finding specific text and change the format

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    58

    Finding specific text and change the format

    Dear forum members,

    In my spreadsheet consisting on 443956 rows, I want to change the format of specific text as follows:

    Find the text:
    "1. Open a file per vendor an number according to the SAP vendor number.
    2. For each vendor open files per financial year and month.
    3. Use these files for supporting documents. These files does not replace the SAP process."

    Change the font to italics dark grey

    Each line of text on a separate row within the cell

    Merge the text across cells in column C-O



    Then

    Find the following text just below (Fin Year):

    "Replace the x in the number with the consecutive number."

    Change the font to italics dark grey

    Merge the text across cells in column D-O


    Then

    Then find the following text just below (Month)

    "Replace the x in the number with the consecutive number."

    Change the font to italics dark grey

    Merge the text across cells in column E-O

    The sheet consists of 443956 rows.


    I am attaching an example of the workbook for your use and advice.


    In anticipation.....

    Louisa
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,862

    Re: Finding specific text and change the format

    You will need VBA to do this so consider re-posting on the Excel programming forum.

  3. #3
    Registered User
    Join Date
    01-22-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Finding specific text and change the format

    Thank you. Will do

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Finding specific text and change the format

    Hi Louisa,

    Take a look at the attached workbook and see if it does what you need.

    It uses the following code:

    Please Login or Register  to view this content.

    I've taken the liberty of using the above routine to correct the typo's in Cells D2, D86 etc.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-22-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Finding specific text and change the format

    Hallo Greg, I tried and it seems to be working. However the following dialogue keeps popping up. Is there a way to get rid of it?
    Capture.PNG

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Finding specific text and change the format

    Hi again,

    Glad to hear that at least it seems to be working.

    That message didn't appear when using the workbook you posted, but it's possible that your "real" workbook does contain merged cells. Before running the code it might be a good idea to check that cells which are going to be merged don't contain data, because otherwise data from all cells other than the first one in the merge range will be lost.

    The way to prevent the message from appearing is to add the following highlighted statement to the existing code:

    Please Login or Register  to view this content.
    Strictly speaking, Alerts should be re-enabled when they are again required, but they will default to the enabled state when the routine finishes.


    Hope this helps - please let me know how you get on.

    I'll be away from tomorrow morning until next Tuesday evening - I should be able to reply at that stage.

    Regards,

    Greg M

  7. #7
    Registered User
    Join Date
    01-22-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Finding specific text and change the format

    Hallo Greg,

    Yes you were spot on. I found that some of the cells had text in the cell next to it. I removed those redundant text and then the code worked like a charm.

    Thank you.

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Finding specific text and change the format

    Hi again Louisa,

    Many thanks for your feedback and also for the Reputation increase

    You're very welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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. Replies: 24
    Last Post: 11-10-2015, 07:27 PM
  2. [SOLVED] Finding Specific Text within a String of Text
    By mphillips in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-13-2014, 08:31 AM
  3. finding a specific text and average the number of data of that text
    By bravo8939 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-09-2013, 10:16 PM
  4. [SOLVED] Macro to convert specific text and format specific text within a string
    By Mencae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2012, 12:13 AM
  5. Finding row value of specific text
    By newguy99 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2010, 05:00 AM
  6. Replies: 6
    Last Post: 07-15-2009, 07:44 AM
  7. Finding Specific Text in a Text String
    By Peter Gundrum in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-10-2005, 03:06 PM

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