Google Sheets - Number to Words, Spell Numbers as Text

Поделиться
HTML-код
  • Опубликовано: 6 окт 2024

Комментарии • 98

  • @andreajaquelinearellanodia6250
    @andreajaquelinearellanodia6250 4 года назад

    I've been looking for something like this for months. A few days ago I gave up and looked to migrate all the info I was using to Excel and had to try a super weird formula to substitute Query (with success). But this opens a lot more possibilities and makes my life more simple.
    Thank you so much!!

  • @kelvinyusuf9030
    @kelvinyusuf9030 2 года назад +2

    Hello the function doesnt work anymore in 7 FEBUARY 2022. In the log function its still work, but in the sheet it's keep loading

  • @dsky6689
    @dsky6689 4 года назад +3

    Thanks! This is great for automatically creating documents.

  • @legerolighting3762
    @legerolighting3762 4 года назад +1

    thanks for providing us good videos on google sheet , you are doing great job

  • @feyandd
    @feyandd Год назад +1

    I see that at 3:15 you wanted to test it with cents. Were you able to do so? I need to add it with cents. Can you please help? Thank you

  • @mazin_0_0
    @mazin_0_0 4 года назад +1

    Thank you so much and thanks for the Github contributor

  • @grishau
    @grishau 4 года назад +1

    Thanks a lot for the tutorial! That is exactly what I was looking for!

  • @richardmhain
    @richardmhain 4 года назад +1

    Thanks for sharing this awesome video and great library. I guess we can take a look at the js code as well and see how it is processed.
    Got 'formula only' version too? Not really sure if that's possible but that would be better, right?
    Stay safe and help us God get through this pandemic.
    More power to you folks!

  • @thewarcry03803
    @thewarcry03803 3 года назад

    Mi estimado, Usted se merece 10,000,000 de Suscriptores, Demasiada calidad en sus tutoriales

  • @shilpanm23
    @shilpanm23 4 года назад

    Extremely helpful. Was looking for it for a long time. Thank you!

  • @SaqlainMallick
    @SaqlainMallick 4 года назад +1

    It was Revolutionary for me.

  • @dtwoproenterprise9754
    @dtwoproenterprise9754 2 года назад

    Thanks for the great tutorial. Anyway to include cents (1234.)? Appreciate to share if you know the way.

  • @tojonirinafehizororandriarison
    @tojonirinafehizororandriarison 4 года назад +1

    Thank you! Very useful

  • @govindugale
    @govindugale 4 года назад +1

    Great job..! Thanks..💐👌

  • @Viazm
    @Viazm 3 года назад

    Thank you so much for the excellent clarification of the topic. I noticed that this function cannot be used on an array. Is it true?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад

      Yes, but you can rewrite the function to also accept arrays if necessary.

  • @AlexanderAbramovNN
    @AlexanderAbramovNN 4 года назад +4

    Отличный урок! и наконец-то русский язык)

    • @Viazm
      @Viazm 3 года назад +1

      меня тоже очень порадовало :)

  • @almichaelnavalta6585
    @almichaelnavalta6585 4 года назад

    great! can you make a video about SORTN function? thanks

  • @atluu4371
    @atluu4371 3 года назад

    Super Cool Tool, I love it ❤️❤️❤️

  • @reneboygarcia
    @reneboygarcia 4 года назад +2

    How can I do with decimal?

    • @SyiarSunnahNabawiyah
      @SyiarSunnahNabawiyah 3 года назад

      same here

    • @feyandd
      @feyandd Год назад

      @@SyiarSunnahNabawiyahwere you able to find out how to do it with a decimal?

    • @feyandd
      @feyandd Год назад

      were you able to find out how to do it with a decimal?

  • @aNDy-qh1em
    @aNDy-qh1em 4 года назад

    Great, thanks!, i wish i had it for Excel selecting language

  • @ali5t4ir
    @ali5t4ir 6 месяцев назад

    Thank you again extremely helpful - can this be used in an Arrayformula? somehow I cant get it working =ArrayFormula({"MED1T";IF(K2:K"", num2t(M2:M),)})

  • @ClaudiaMoschettini
    @ClaudiaMoschettini 4 года назад +2

    very nice! Great, thanks!

  • @jralsen
    @jralsen 4 года назад +1

    what a genius

  • @sgari1974
    @sgari1974 4 года назад

    Is it possible to function certain words into different words of my choice?
    For example I have Apple, Orange and a Pineapple, is it possible if I wrote Apple it will present it as "Red" and Orange into "Orange"?

  • @GerzaynFuentesKoltekmx
    @GerzaynFuentesKoltekmx 2 года назад

    Great! Gracias!

  • @josephyoussef9100
    @josephyoussef9100 3 года назад

    Hello Dear, thank you for this but actually, I tried millions of times without success, could you please share with us the google sheet you worked on in order to make a copy and work directly on your personalized version, thank you very much for your understanding and support.

  • @mohamedzedan1792
    @mohamedzedan1792 4 года назад +1

    wonderful

  • @VebyoArson
    @VebyoArson 2 года назад

    is there a way to do it in an array? because I got a lot of number rows to convert at once and I want it to be faster. Thank you in advance!

  • @neerajconstructions5618
    @neerajconstructions5618 4 года назад

    HI!. Your video was very helpful!! Thank You So Much!! Can you please tell a way to remove those Dashes - The " - " sign from those figures?? Please help. Thank You

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      Use SUBSTITUTE function around it and replace "-" with " "

    • @neerajconstructions5618
      @neerajconstructions5618 4 года назад +1

      @@ExcelGoogleSheets Hi!! I didn't try your above said method, but I reverse engineered the code, and changed the 206th line of code from "-" to " " (Giving just one space between the quotes). It worked. Anyway, I value your response. Thank you for your help!

  • @KarolKarasiewicz
    @KarolKarasiewicz 2 года назад

    If I wish to format number (ex. 12.34) similar to TEXT(12.34, "#0.00") in app Script?
    BTW - I admire Your job, all is planned, soryed, tagged.... I feel here almost like on my own PC.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed

  • @proteksitanamanfpunila5673
    @proteksitanamanfpunila5673 2 года назад

    Please update sir, this function doesn't work again..

  • @hassanahmad9597
    @hassanahmad9597 3 года назад

    What about those language you watch not included?

  • @dgvisual7476
    @dgvisual7476 4 года назад

    Great!, now the second part including cents.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +3

      You should be able to use the same function by simply extracting the cents part out of a number and running the same function over it.

    • @richardmhain
      @richardmhain 4 года назад +1

      About cents, as I remember about writing cheques, cents are not converted to words, rather just write the number then /100, eg: 45/100.
      But for other purposes where cents need to be converted to words, then same function can be used plus "cents" or it's equivalence in other languages, eg Spanish: "cuarenta y cinco centavos"; English: forty five cents. Usually, that is when "and" is required, eg 123.45 converts to "one hundred 'x' twenty three and forty five cents", where 'x' depends on "noand" value.
      Then again, other places may have different cents handling, so better confirm what's required.
      To summarize, cent parameters could be:
      cents - true or false
      prefix - ' and ', ', ', 'x'
      centnum - true or false
      suffix - true or false
      Looks complicated, maybe the reason why it's excluded :)
      Thanks for sharing this video and library.
      Cheers!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +1

      As I was recording this video it occurred to me that this function converts numbers to text, not currency to text. So 123.45 would be "one hundred twenty three point forty five", there are no dollars or cents. Changing this to make it output dollars and cents is not that complicated in English. In English It's One Dollar and the rest are all Dollars, ex. 101 Dollars. I'm not sure how this works in other languages though.

    • @richardmhain
      @richardmhain 4 года назад

      @@ExcelGoogleSheets Cents and decimals I guess needs their own functions.
      Cents for currency may have default 2 decimal places.
      There are currencies though that don't have cents, like Japanese Yen, Indonesian Rupiah, etc...
      eg, 1 U$ = 0.000064 Rupiah as of this writing.
      So if we have around $64, we're millionaires out there - hooray!
      Meanwhile, decimals may have following parameters:
      Length, eg: x.1 or x.12 or x.123, or x.123456, etc...
      Rounding, eg: 1.5 = 1 and 2.5=2 or 1.5=2 and 2.5=2
      I guess we can stick to integers for this session. makes life easier for all of us :)
      Cheers!

    • @feyandd
      @feyandd Год назад +1

      @@richardmhain Can you add the formula with cents for me please?
      What would I need to add and where should I put it, so I can get the cents in the correct spot so I can have the correct function. Thank you
      this is my function so far
      function Test() {
      let result = writtenNumber(1234);
      console.log(result)
      }
      function NUMBERTOTEXT(Num,lang = "en", noAnd = false) {
      let result = writtenNumber(Num, {lang: lang, noAnd});
      return result;
      }
      Execution log
      11:11:59 AM Notice Execution started
      11:11:56 AM Info one thousand two hundred and thirty-four
      11:12:00 AM Notice Execution completed

  • @ninhnguyen1609
    @ninhnguyen1609 3 года назад

    cảm ơn bạn, tôi đến từ việt nam

  • @owenlim225
    @owenlim225 2 года назад

    Nice

  • @MohamedElSayed-en6yg
    @MohamedElSayed-en6yg 2 года назад

    I've been trying to run the function but gave me this message "Attempted to execute numbertotext, but it was deleted."
    does anyone know why?

  • @alemrivasr
    @alemrivasr 4 года назад

    I have a question.... how could you apply this in an array formula? because it only works if you have the number beforehand

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      You will need to completely rewrite the function for it to work with arrays.

  • @nokiapal1
    @nokiapal1 3 года назад

    This in mobile can do

  • @hellobidyut
    @hellobidyut 2 года назад

    This trick not working on array formula . Please Help

  • @gumiho5313
    @gumiho5313 2 года назад

    How about with decimal?

  • @aungthanoo347
    @aungthanoo347 2 года назад

    Dear Sir, Thank you so much for this. You are great.
    I have been trying to get this for milleniums. I watch and studied nearly all your videos.
    One problem though. I got the decimal (cent) part working by using "right", "len", and "search" functions.
    But the problem is if the decimal is equal to or greater then .50, this rounds up to 1.
    e.g.
    106,000.54 ====> One Hundred Six Thousand One and Fifty-four cents.
    The only round up code I can find is in line 1713 "n = Math.round(+n);
    If I comment that line, the result gets "ERROR".
    Is there any fix you can think of. I really appreciate your suggestion.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      Multiply the decimal number by 100, so 0.54 * 100 will be 54.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      You can round up using ROUNDUP function in spreadsheet or you can use Math.ceil() in JavaScript

    • @aungthanoo347
      @aungthanoo347 2 года назад

      @@ExcelGoogleSheets Dear Sir, Thank you so much for your prompt reply. I really appreciate it.
      My problem is, I don't want to roundup the decimal numbers. The library code is rounding up the decimal numbers to whole numbers if it finds decimal.
      Here is what I have and what function I used and the output of the function:
      In cell "E9" =====> "US Dollars"
      In cell "B15" =====> "106,000.50"
      The function I used is:
      =if(RIGHT(B15, len(B15)-(search(".",B15)))="0",E9&" "&Proper(NUMBERTOTEXT(B15))&" only.", E9&" "&Proper(numbertotext(B15)&" "&numbertotext(RIGHT(B15, len(B15)-(search(".",B15))))&" cent only."))
      The result is:
      "US Dollars One Hundred Six Thousand And One Fifty Cent Only"
      I hope this clear things up. This would not only help me. I hope this will help others who are looking for this decimal issue. I slute you sir.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      @@aungthanoo347 instead of NUMBERTOTEXT(B15) use NUMBERTOTEXT(INT(B15))

    • @aungthanoo347
      @aungthanoo347 2 года назад

      @@ExcelGoogleSheets Thanks for your prompt reply. Let me try. It will work 😀.

  • @SANTOSHKUMAR-ee4oj
    @SANTOSHKUMAR-ee4oj 3 года назад

    How to get output in Indian format. (1 crore, 1 lakh etc., instead of millions & billions)

  • @tusharkumar7808
    @tusharkumar7808 3 года назад

    SyntaxError: Invalid or unexpected token (line 3, file "Code.gs")Dismiss
    show this......please halp me

  • @rawyabasheer5624
    @rawyabasheer5624 4 года назад

    thank you, but how I can add currency to the code (dollar and cents)?

    • @rawyabashir9804
      @rawyabashir9804 4 года назад

      ?? How

    • @artemjetman
      @artemjetman 3 года назад

      @@rawyabashir9804 =UPPER(NUMBERTOTEXT(E27))&" DOLLARS U.S." This will just add dollars at the end

  • @hassanahmad9597
    @hassanahmad9597 3 года назад

    How to add “only” in the end of each sentence?

    • @yingxuanyong5940
      @yingxuanyong5940 2 года назад

      hi, i just add somthing behind the code and it worked!
      you can try on it
      return (result)+" Only"
      at the "NUMBERTOTEXT" script there

  • @designkaralo
    @designkaralo 3 года назад

    how can i fix this error? : Syntax error: SyntaxError: Unexpected token '!' line: 1 file: no to words.gs

    • @feyandd
      @feyandd Год назад

      function Test() {
      let result = writtenNumber(1234);
      console.log(result)
      }
      function NUMBERTOTEXT(Num,lang = "en", noAnd = false) {
      let result = writtenNumber(Num, {lang: lang, noAnd});
      return result;
      }

  • @shafi4ever
    @shafi4ever 4 года назад

    Thanks a lot. But this is not functioning correctly for 6 digit or more digit numbers, plz check and reply

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      I can only check English version and it seems fine to me.

    • @shafi4ever
      @shafi4ever 4 года назад

      @@ExcelGoogleSheets I am also talking about English version. For example, if I enter 12345 it results correctly as Twelve thousand three hundred and forty-five. But as I enter a six digit number 123456 it spelled as one hundred twenty three thousand four hundred fifty-six.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      Yes, isn't that correct?

    • @divi12345
      @divi12345 4 года назад +1

      Shafiuddin Ahmed try the Indian English option , then it will make sense to you

    • @divi12345
      @divi12345 4 года назад +1

      Learn Google Spreadsheets not in Indian number system

  • @nooredge
    @nooredge 4 года назад

    When I add this code it retur with this message: Missing ) at line 3
    function NUMBERTOTEXT(num,lang = "fr") {
    let result = writtenNumber(num, {lang: lang});
    return result;
    }

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +1

      This works under V8 runtime. It looks like you might have an old project from Rhino runtime.

    • @nooredge
      @nooredge 4 года назад

      Learn Google Spreadsheets that’s right.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      You can still use it, just don't use default NUMBERTOTEXT(num,lang){

    • @feyandd
      @feyandd Год назад

      function Test() {
      let result = writtenNumber(1234);
      console.log(result)
      }
      function NUMBERTOTEXT(Num,lang = "en", noAnd = false) {
      let result = writtenNumber(Num, {lang: lang, noAnd});
      return result;
      }

  • @MauroDinosauro
    @MauroDinosauro 2 года назад

    Anyone knows if it is possible to do the same thing in Italian language? Thank you.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      Try to wrap it in GOOGLETRANSLATE function and see if translations work for you.

    • @MauroDinosauro
      @MauroDinosauro 2 года назад

      @@ExcelGoogleSheets Thanks, I am going to try it!

    • @MauroDinosauro
      @MauroDinosauro 2 года назад

      ​@@ExcelGoogleSheets Ok, I found a way to get the word numbers in Italian.
      Now I just need to fix the last thing: to cancel the spacing between words. For example:
      From 1200 = "mille due cento" to 1200="milleduecento".
      Actually the first one ("mille due cento") is not correct in my language. :(
      Is there a code that I have to change to fix this issue?
      Thank you again!

  • @Shkur777
    @Shkur777 4 года назад +1

    7:00 :)

  • @xoloapps8126
    @xoloapps8126 4 года назад

    If you just need to convert a small set of numbers to words I think this alternative is a good option (not have to use code):
    ruclips.net/video/_Y7c798qujU/видео.html

  • @varalakshmik9739
    @varalakshmik9739 3 года назад

    ॾँटडतककरग

  • @akunkedua69
    @akunkedua69 4 года назад

    thanks, sir...work for me 👍🙏

    • @akunkedua69
      @akunkedua69 4 года назад

      i notice your video in the script.

  • @eladministrador4286
    @eladministrador4286 2 года назад

    Amazing! Thank you so much