+ Reply to Thread
Results 1 to 8 of 8

Temporarily change strings

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Temporarily change strings

    I want to select a number of cells, temporarily make changes as noted below, and show the changes in a format such as a picture in this case.
    CHANGE 1: Change the dot character "." with a hashtag "#".
    CHANGE 2: [Preamble: Assume all characters have a weighting of 1 except the hashtag character "#" which has a weighting of 0.5. So when counting the number of characters, 2 of "#" equal 1 of any other character.] .......... Then colour each character green if the count of that character is a whole number (for weighting of 1 and 0.5 respectively) or an even whole number (for weighting of 2 and 1 respectively). Otherwise colour red.

    The code below is a work in progress and based on a sample from elsewhere. It does not incorporate Change 2.

    * Note that when the code is run, the image width is only the size of the column and may not fit the total number of characters. Is there a way to make it fit the entire length of the data. Maybe a completely different method to display the data as opposed to the current method?


    EXAMPLE

    Cell data
    a+b + ..1-jmq. - qw.erty
    d-k .2np. 2k2m..j3
    h+j .582. 2k2m...jk

    Image required when macro is run
    a+b + ##1-jmq# - qw#erty
    d-k #2np# 2k2m##j3
    h+j #582# 2k2m###jk

    Please Login or Register  to view this content.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Temporarily change strings

    Maybe :
    Please Login or Register  to view this content.
    Attached Files Attached Files
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Temporarily change strings

    @karedog
    Thx, this works quite well.
    But for some reason the more the macro is invoked, the slower it gets, after about 10 runs Excel freezes up.
    Is this because the pictures are stored somewhere?

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Temporarily change strings

    You are welcome.

    No, there is only one picture affected (the "ZoomCell" picture), so it uses a very tiny system resources.
    It seemed that you have another code running or other things that cause the slow down.
    If you can't locate the cause by yourself, you need to upload your workbook, so I can find the cause.

  5. #5
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Temporarily change strings

    Please see attached.
    Also can I change zoom level?
    Attached Files Attached Files

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Temporarily change strings

    I tried the your attached file, it run very smooth on my PC, nothing is wrong.
    I modify the code to avoid the event enabler and disabler, don't know if this could help on your PC.
    I also add the Zoom feature to the code :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Temporarily change strings

    Thx once more.

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Temporarily change strings

    You are welcome, thanks for marking the thread as solved.

    Regards

+ 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. [SOLVED] Change font colour of specific letter strings
    By Klofange in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-15-2014, 03:58 AM
  2. Replies: 3
    Last Post: 06-14-2014, 08:15 PM
  3. [SOLVED] Loop through strings stop when strings change and start looping in the next column...?
    By Prexcel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2013, 03:31 AM
  4. Replies: 1
    Last Post: 08-13-2013, 08:32 AM
  5. Change Cell Strings in Column to Replace Specifically the Second Character
    By Steve794421 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2013, 09:36 AM
  6. Replies: 1
    Last Post: 12-08-2011, 03:24 PM
  7. Temporarily change:I there a way to not print a cell(s)?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM

Tags for this Thread

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