+ Reply to Thread
Results 1 to 10 of 10

Format number to a text cell

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Format number to a text cell

    Hello,

    Is there a way to have a cell display number, but behind the text is actually a text that I can ask Excel to use in calculations?
    I dont know if can be done with a macro code...

    Thanks! Regards,


    pezal

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Format number to a text cell

    Hi Pezal,

    Do you need a 'number' to appear as 'text' but should be ok with calculations.. correct?

    what type of text appearance you want.. just the left alignment or something else ?


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Format number to a text cell

    If you have a number in a cell (A1) that is actually text, you can reference that from another cell (B1) and use it in calculations, you can do that in a number of ways. Lets say you want to multiply the "value" in A1 by 10...

    =value(A1)*10
    =A1*10
    =(A1+0)*10

    These are very simple examples, that show some of the ways
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Format number to a text cell

    you use, multiply *1, with that kind of information.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Format number to a text cell

    Hello!

    And thanks for all replies and interest.

    In cell A1 I have the word: "House". I would like to view in that cell the number "1" instead of the text, but I need to keep the word "House" in the formula bar cause I will use it in my calculations.

    Hope I have explained myself...

    Thanks once again!

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Format number to a text cell

    HI pezalmendra,

    use formula =1+N("house")


    Regards,
    DILIPandey
    <click on below * if this helps>

  7. #7
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Format number to a text cell

    Hi DILIPandey,

    Its exactly what I was looking for! Do you think this can also be done using a VBA code?

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Format number to a text cell

    yes.. use this formula in VBA code.. simple


    Regards,
    DILIPandey
    <click on below * if this helps>

  9. #9
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Format number to a text cell

    Okay!

    And it is possible perhaps to just apply a format to that cell? For example to do it the other way (display a text with a number on the cell) I can do it with a custom format...

    regards

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Format number to a text cell

    Yes. ... done that in yellow cell and then tested that for calculation purpose in Green cell, see attached:-

    including text in cell with number.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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