+ Reply to Thread
Results 1 to 5 of 5

Text Formula for value within same cell

  1. #1
    Registered User
    Join Date
    01-28-2019
    Location
    London
    MS-Off Ver
    MS 2010
    Posts
    2

    Text Formula for value within same cell

    Hi All,

    I have an situation where i don not want to trim the leading zeros and the cell format should be general not any custom format.

    ex : "000000000000469" in general format.

    I searched online solutions for this and found i can use text function to achieve this i.e. =TEXT(A1, "000000000000000" ) . But the issue is i cannot get to use the formula within same cell itself. for example i need to use the
    formula =TEXT(A1, "000000000000000" ) on the cell A1 itself so that when the user writes in A1 the format will be 000000000000000.

    The formula doesn't work as expected if i have the formula in A1 and reference value A1 as well. is there a way i can use the text Formula for value within same cell ?

    i am using MS office 2010

  2. #2
    Registered User
    Join Date
    03-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Text Formula for value within same cell

    Can you let us know, what is the formula you want to use, and what is expected outcome?
    I can help, only if you can give me a detailed question.

  3. #3
    Registered User
    Join Date
    01-28-2019
    Location
    London
    MS-Off Ver
    MS 2010
    Posts
    2

    Re: Text Formula for value within same cell

    Hi,

    Formula want to use = TEXT( A1, "00000000000000")
    Where - in cell A1
    Cell format - General
    Outcome - 00000000000095 ( if the user types 00000000000095 on cell A1 )

    MS excel version 2010

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Text Formula for value within same cell

    You cannot have a formula & a value in a single cell, it's either one or the other.
    You either need to put the formula in column B, or you will need a macro

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Text Formula for value within same cell

    Why does the cell need to be formatted as general? If you preformat the cell as text @, then an entry of 00000000000095 would be treated as text and the leading 0s retained.

    If you cannot preformat the cell, is there something happening during data entry that prevents you from prefacing the entry with an apostrophe ('00000000000095) that tells Excel to treat the entry as text?

    The key is that you need to do something so that Excel cannot treat the entry as a number. Either of those approaches seem easier than the complications of running a macro.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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: 2
    Last Post: 01-20-2018, 09:59 AM
  2. [SOLVED] If cell has a formula, copy text to TextBox and leave formula unchanged in cell
    By yachrishere in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-01-2016, 06:26 PM
  3. Formula Limitations : If cell contains text then place text in said cell
    By capt fantastikk in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 02-03-2015, 01:05 AM
  4. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  5. Formula to identify part of a text in cell from range of cells & insert adjacent cell text
    By Novicebutnotforlong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2013, 02:11 AM
  6. Replies: 1
    Last Post: 01-24-2012, 11:15 AM
  7. Replies: 4
    Last Post: 04-11-2011, 08:41 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