+ Reply to Thread
Results 1 to 14 of 14

How convert text to value ?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    How convert text to value ?

    Is there any function in excel to do the opposite making TEXT function ? For example, TEXT function converts a value to text in a specific number format but I want converts text to value, how I can to do that ?
    Initially I was thinking to do this using the "IF" but I'm 12 words and Excel 2003 supports up to 8 "IF's" in one formula.
    Some help, please.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How convert text to value ?

    Hi,

    Can you give some examples of the text strings you wish to convert, and to what you wish to convert them?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    Re: How convert text to value ?

    It is the month of the year that are written in Romanian, for example:

    Ianuarie
    Februarie
    Martie
    Aprilie
    Mai
    Iunie
    Iulie
    Septembrie
    Octombrie
    Noiembrie
    Decembrie

    I would like to convert them to numbers 1 ... 12.
    Last edited by public; 11-05-2013 at 06:17 AM.

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: How convert text to value ?

    A1 = input
    B1 = MATCH(A1, {"Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"}, 0)

    This will look along an array of text strings and then return the index of the match.

    Note this only has eleven months; it's missing August?
    Last edited by ben_hensel; 11-05-2013 at 06:24 AM.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How convert text to value ?

    Hi,

    If your list of months is orthographically identical (i.e. includes all necessary diacritics, etc.) to those in your version of Excel, you should be able to use e.g.:

    =--TEXT(1&A1&2013,"m")

    Regards

  6. #6
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    Re: How convert text to value ?

    Sorry, but not working.

    So, I have a cell which reads the value of a list (a list of months of the year). This cell (eg A3) should return the number corresponding to the month selected from the list.

    Other ideas please!

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How convert text to value ?

    Hi,

    Post a sample workbook, please.

    Regards

  8. #8
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    Re: How convert text to value ?

    I attach a working draft file.
    In cell A3 from the "macheta" sheet I want to write a excel formula to return a number that corresponds to the selected month from the sheet "raportare".

    http://www.mediafire.com/download/fe...ample_work.xls

    I can not attach the file above into this forum because I am private network that keeps asking me username and password when I try attach file. It's the only forum where that happens. Why? I don't know.

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How convert text to value ?

    So the formula I gave earlier works perfectly fine, assuming you adapt the cell references accordingly (did you do this?). And, of course, as I stated earlier, providing your list of month names are identical to those that your version of Excel uses.

    =--TEXT(1&raportare!B2&2013,"m")

    You might need to change the "m" to whichever letter is used to represent "month" in your version.

    Regards

  10. #10
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    Re: How convert text to value ?

    I have Excel 2003 version in English then what should replace the "m"?

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How convert text to value ?

    Nothing.....................

  12. #12
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    Re: How convert text to value ?

    You used somehow Excel 2003 because does not work in my case when I using this formula:
    =--TEXT(1&raportare!B2&2013,"m")

    I used the file I attached above. I tried to change the "m" in the "month" but does not work at all.

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How convert text to value ?

    Ah, I see. You're using an English language version of Excel but you want to keep the list of months in Romanian, correct?

    If that's the case then you'll need to use a solution similar to that offered by ben_hensel.

    Regards

  14. #14
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2021
    Posts
    141

    Re: How convert text to value ?

    I retrying the example shown by user ben_hensel and it works perfectly.

    Thanks all.
    The thread can be closed now.

+ 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] Use VBA to run "text to columns' Loop on first row to convert from text to date format
    By csmiley in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-03-2013, 02:06 PM
  2. Convert Text Dates, Perform Calculation, Convert back to Text
    By Orada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2012, 05:25 PM
  3. Macro to convert a mutiple sheet workbook to tab delimited text or fixed width text file
    By chandra 2185 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2012, 10:29 AM
  4. Convert lowercase text to uppercase text in Excel
    By mls_newbee in forum Excel General
    Replies: 1
    Last Post: 09-22-2010, 01:14 PM
  5. convert a range of lowercase text to upper text or vice versa
    By jackdaw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2005, 05:06 PM

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