Results 1 to 2 of 2

Thread: Mystery with Text formatted cell - Help

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Posts
    1
    Rep Power
    0

    Mystery with Text formatted cell - Help

    Hello,
    I have a cell with Text format.
    If I write "- TestTest." (with a dash at the beginning and a dot at the end) and press Enter, no problem.
    If I select another cell, the address of this cell is written after the dot and the selected cell is surrounded by dashes like when you make a formula.
    It's a problem if it starts with "-", "+" or "=".
    I work with Excel 2010 and Excel 2013.
    Do you know if there is a way to avoid this, without having to manually enter a " ' " at the beginning?
    Although I would prefer to avoid the use of " ' ", I have tried to have a " ' " added automatically in Worksheet_Change and Worksheet_SelectionChange instances but it doesn't work
    Thanks! José

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,446
    Rep Power
    10
    Hello José,
    Welcome to ExcelFox

    I have two ways that I overcome these sorts of problems. I leave the cell as standard format , not text format.
    Then
    Either
    Leave a space, before writing
    Or
    Write what I want as a formula.

    So for your example, in a cell with standard format I would write exactly either of these two texts, ( remember the first one has a space before the - )
    Code:
     - TestTest. 
    
    ="- TestTest."
    I don’t know if there are any other ways to achieve what you want. I expect there might be, but I don’t know about them. Possibly someone else might have an idea later

    Alan
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Similar Threads

  1. Counting font color of conditionally formatted cells
    By truckdriver in forum Excel Help
    Replies: 2
    Last Post: 05-22-2016, 03:50 AM
  2. Replies: 9
    Last Post: 01-12-2016, 11:30 AM
  3. VBA How to pass formatted text from Excel to MS Word
    By johnweber in forum Excel Help
    Replies: 2
    Last Post: 03-01-2015, 08:41 PM
  4. Replies: 5
    Last Post: 03-09-2013, 09:01 AM
  5. FORMATTED Flexible Concatenation Function
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 1
    Last Post: 10-14-2012, 03:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •