+ Reply to Thread
Results 1 to 7 of 7

use '-' as text

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    sheffield, england
    MS-Off Ver
    Excel 2010
    Posts
    38

    use '-' as text

    dear friends

    i have a list of suffixes in xls. when i want to place '-' in front of the words, to denote that they are suffixes, xls reverts to using it as a function/formula and this does not change even if i format the column to text. how can i use '-' before a word in xls (ie., text string begins with '-') as a text please?

    thanks.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,105

    Re: use '-' as text

    Start the string with a ' a single tick.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    10-04-2013
    Location
    sheffield, england
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: use '-' as text

    sorry, i was only wanting to use -. i typed as '-' just to highlight the character -. pl reply again. thanks.

  4. #4
    Registered User
    Join Date
    10-04-2013
    Location
    sheffield, england
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: use '-' as text

    for eg septicaemia is two parts - septic and aemia. i want aemia to show in the xls as -aemia.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,105

    Re: use '-' as text

    Try putting a space before the hyphen (a3). That will fool it into thinking it's text.

    Also take a look at the sheet. It illustrates the options. The single tick is a non-printing character. See A4.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 08-30-2014 at 04:18 AM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: use '-' as text

    if you format the cell as text BEFORE entering - it will stay as text
    you cant just enter it in general then change to text
    or as glen says put it in as '-asdf you wont see the '
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,105

    Re: use '-' as text

    Thanks Martin, I forgot about this:
    "if you format the cell as text BEFORE entering - it will stay as text"

+ 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] Need to Mod Code on red text, I have VBA to distinguish Paid(Black Text) Unpaid(Red Text)
    By Garbology in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-11-2014, 07:55 PM
  2. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  3. Replies: 0
    Last Post: 04-22-2013, 12:13 PM
  4. Macro to Parse Text - Import text to Excel from Multiple Text Files & Folders
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:05 AM
  5. [SOLVED] Use .text from previous text box in form to prefill text in second text box
    By chromachem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2012, 10:04 PM

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