Thursday, March 21, 2024

Convert Numbers into Words in Microsoft Excel (Code)

 Option Explicit


'Main Function


Function SpellNumber(ByVal MyNumber, Output)

Dim Dollars, Cents, Temp

Dim DecimalPlace, Count

ReDim Place(9) As String

Place(2) = " Thousand "

Place(3) = " Million "

Place(4) = " Billion "

Place(5) = " Trillion "


' String representation of amount.

MyNumber = Trim(Str(MyNumber))


' Position of decimal place 0 if none.

DecimalPlace = InStr(MyNumber, ".")


' Convert cents and set MyNumber to dollar amount.

If DecimalPlace > 0 Then

    Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))

    MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))

End If


Count = 1


Do While MyNumber <> ""


    Temp = GetHundreds(Right(MyNumber, 3))

    If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars

        If Len(MyNumber) > 3 Then

            MyNumber = Left(MyNumber, Len(MyNumber) - 3)

        Else

            MyNumber = ""

    End If

    Count = Count + 1


Loop


If Output = 0 Then


Select Case Dollars

    Case ""

        Dollars = ""

    Case "One"

        Dollars = ""

    Case Else

        Dollars = Dollars

End Select


Select Case Cents

    Case ""

        Cents = ""

    Case "One"

        Cents = "Point One"

    Case Else

        Cents = " Point " & Cents

End Select


End If



If Output = 1 Then


Select Case Dollars

    Case ""

        Dollars = "No Dollars"

    Case "One"

        Dollars = "One Dollar"

    Case Else

        Dollars = Dollars & " Dollars"

End Select


Select Case Cents

    Case ""

        Cents = " and No Cents"

    Case "One"

        Cents = " and One Cent"

    Case Else

        Cents = " and " & Cents & " Cents"

End Select


End If


If Output = 2 Then


Select Case Dollars

    Case ""

        Dollars = "No Pesos"

    Case "One"

        Dollars = "One Peso"

    Case Else

        Dollars = Dollars & " Pesos"

End Select


Select Case Cents

    Case ""

        Cents = " and No Cents"

    Case "One"

        Cents = " and One Cent"

    Case Else

        Cents = " and " & Cents & " Cents"

End Select


End If


If Output = 3 Then


Select Case Dollars

    Case ""

        Dollars = "No Pounds"

    Case "One"

        Dollars = "One Pound"

    Case Else

        Dollars = Dollars & " Pounds"

End Select


Select Case Cents

    Case ""

        Cents = " and No Pence"

    Case "One"

        Cents = " and One Pence"

    Case Else

        Cents = " and " & Cents & " Pence"

End Select


End If


If Output = 4 Then


Select Case Dollars

    Case ""

        Dollars = "No Euros"

    Case "One"

        Dollars = "One Euro"

    Case Else

        Dollars = Dollars & " Euros"

End Select


Select Case Cents

    Case ""

        Cents = " and No Cents"

    Case "One"

        Cents = " and One Cent"

    Case Else

        Cents = " and " & Cents & " Cents"

End Select


End If


SpellNumber = Dollars & Cents


End Function



' Converts a number from 100-999 into text

Function GetHundreds(ByVal MyNumber)


Dim Result As String


If Val(MyNumber) = 0 Then Exit Function


MyNumber = Right("000" & MyNumber, 3)


' Convert the hundreds place.

If Mid(MyNumber, 1, 1) <> "0" Then

    Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "

End If


' Convert the tens and ones place.

If MyNumber <= 99.99 Then


    If Mid(MyNumber, 2, 1) <> "0" Then

        Result = Result & GetTens(Mid(MyNumber, 2))

    Else

        Result = Result & GetDigit(Mid(MyNumber, 3))

    End If

    

Else

    If Mid(MyNumber, 2, 1) <> "0" Then

        Result = Result & "and " & GetTens(Mid(MyNumber, 2))

    Else

        Result = Result & "and " & GetDigit(Mid(MyNumber, 3))

    End If

End If

GetHundreds = Trim(Result)


End Function



' Converts a number from 10 to 99 into text.

Function GetTens(TensText)


Dim Result As String


Result = "" ' Null out the temporary function value.


If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...


    Select Case Val(TensText)

        Case 10: Result = "Ten"

        Case 11: Result = "Eleven"

        Case 12: Result = "Twelve"

        Case 13: Result = "Thirteen"

        Case 14: Result = "Fourteen"

        Case 15: Result = "Fifteen"

        Case 16: Result = "Sixteen"

        Case 17: Result = "Seventeen"

        Case 18: Result = "Eighteen"

        Case 19: Result = "Nineteen"

        Case Else

    End Select


Else ' If value between 20-99...


    Select Case Val(Left(TensText, 1))

        Case 2: Result = "Twenty "

        Case 3: Result = "Thirty "

        Case 4: Result = "Forty "

        Case 5: Result = "Fifty "

        Case 6: Result = "Sixty "

        Case 7: Result = "Seventy "

        Case 8: Result = "Eighty "

        Case 9: Result = "Ninety "

        Case Else

    End Select


Result = Result & GetDigit(Right(TensText, 1))  ' Retrieve ones place.


End If


GetTens = Trim(Result)


End Function



' Converts a number from 1 to 9 into text.


Function GetDigit(Digit)


Select Case Val(Digit)

    Case 1: GetDigit = "One"

    Case 2: GetDigit = "Two"

    Case 3: GetDigit = "Three"

    Case 4: GetDigit = "Four"

    Case 5: GetDigit = "Five"

    Case 6: GetDigit = "Six"

    Case 7: GetDigit = "Seven"

    Case 8: GetDigit = "Eight"

    Case 9: GetDigit = "Nine"

    Case Else: GetDigit = ""

End Select


End Function


Saturday, September 23, 2023

iPhone 15 Launch Sparks Commotion Among Apple Fans


Hey, everyone! Welcome back to our blog, and today we've got some wild news for you. It's the day we've all been waiting for – the global release of Apple's brand-new iPhone 15!

But here's the kicker – it's not all rainbows and butterflies. We've got some crazy stories coming in from Apple Stores around the world. You can see in this footage the Apple fan's long line of people in New York posted on Twitter X by Susan Li and in San Francisco from the Twitter X user @mandyhong08.

But let's talk about Dubai Mall. Hundreds of eager shoppers gathered there in anticipation of the iPhone 15 launch. Security had to step in and put up barriers as the crowd grew, trying to keep things under control.

But as the big moment got closer, it seemed some folks couldn't contain their excitement. Social media was flooded with videos of customers racing up escalators, trying to outdo each other.

Unfortunately, what started as minor disagreements quickly escalated into a full-blown brawl, and this was all caught on camera by a user on the X Twitter platform, with the handle @levelsio.

Crazy, right? Now, this isn't the first time we've seen something like this happen during a device launch. And you know what? It probably won't be the last.

But it's not all bad news. In other major cities like New York City, London, Mumbai and Beijing, it seems things have been relatively peaceful in comparison.

So, there you have it, folks. The iPhone 15 is here, and it's causing quite a stir worldwide. Let us know in the comments if you've ever been a part of a device launch like this, and don't forget to hit that subscribe button on my YouTube channel for more. Thanks!

Subscribe to my YouTube channel



Friday, September 22, 2023

Unveiling Mt. Banahaw Viewdeck & Cabin: A Slice of Haven in Sariaya, Quezon


Hey there, fellow adventurers! Today, we're thrilled to take you along on a journey to one of the Quezon province's most breathtaking destinations: the Mt. Banahaw Viewdeck & Cabin in Sariaya, Quezon. We were incredibly fortunate to spend a couple of hours at this enchanting spot, and we can't wait to spill the beans about our fantastic experience.

Let's begin by discussing the incredible setting and atmosphere. From the moment we arrived at this place, we found ourselves captivated by the breathtaking surroundings. The majestic presence of Mt. Banahaw in the distance provided a truly awe-inspiring backdrop for our adventure. However, it's not just the mountain that leaves a lasting impression; this location not only offers a sweeping view of Sariaya and neighboring towns like Lucena City but also delivers a distinct Tagaytay feels experience. The cool breeze, often referred to as "Simoy Banahaw," due to its proximity to the base of Mt. Banahaw, will undoubtedly capture your heart.






Yet, the breathtaking view is just the tip of the iceberg. The place is nestled amidst lush greenery and vibrant plants, making it the ideal haven to reconnect with Mother Nature. We took a leisurely stroll through the grounds, soaking in the beauty of the blooming flowers and majestic plants and vegetables. It was an incredibly peaceful and serene experience, and we can't stress enough how worthwhile it is to explore this natural paradise.








Now, let's dive into the culinary treats! Mt. Banahaw Viewdeck & Cabin offers a delicious selection of dishes that will truly tickle your gustatory cell haha! Their menu is a treasure trove of both local Quezonian favorites and a wide range of beverages, all sourced locally for an authentic experience. We wholeheartedly recommend treating yourself to their delightful combination of fried banana, sweet potato (kamote), and chips served on a bed of crisp lettuce, savoring a plate of pancit chami, and, of course, relishing their local coffee "Kape Banahaw", which will awaken your senses, especially if you're a fan of robust kapeng barako. No matter your palate, this place has something to please it, leaving you absolutely delighted!





And last but not least, be sure to savor their signature dish, Sinulbot – a must-try!

And let's not forget about an acoustic band that will entertain you to unwind offering all the creature comforts you could possibly desire for a cozy stay. Whether you're planning a romantic escape or a family getaway, this place is the ultimate spot to unwind and recharge.


All in all, our visit to Mt. Banahaw Viewdeck & Cabin was a true feast for the senses. The view, the food, the lush surroundings, and the impeccable service – they all exceeded our expectations. If you're on the lookout for a serene and picturesque retreat, we wholeheartedly encourage you to put this place on your travel radar. We sincerely hope this blog has piqued your interest and inspired you to embark on your own adventure to this beautiful destination. Thanks a million for tuning in!









Thursday, September 21, 2023

NIYOGYUGAN FESTIVAL 2019 GRAND FLOAT PARADE

On Saturday, August 24, 2019, the Quezon provincial government held the Grand Float Parade on the 8th day of the Niyogyugan Festival, which aims to promote the coconut industry as well as other products and local delicacies of Quezon province. Float designs show and depict the product of the town they represent.

It started at 3:00pm from SM City Lucena as the parade traveled all the way to the capitol for the main show. Float grand parade, street dancing, and Bb. Niyogyugan was among the attractions most awaited in the festival. Bela Padilla and RK Bagatsing also joined the festivities. Here are the winners:

NIYOGYUGAN FESTIVAL Competition FLOAT COMPETITION: 
1st Place – TIAONG

2nd Place - PADRE BURGOS


3rd Place - INFANTA 


STREET DANCE COMPETITION WINNERS: 
1st Place - Plaridel 
2nd Place - Pagbilao 
3rd Place - Tagkawayan 

DANCE SHOWDOWN WINNERS: 
Champion – Pagbilao 
1st Place – Gumaca 
2nd Place – Tagkawayan 
3rd Place – Sariaya 

The First Ever Longest Habhaban at Lucban Pahiyas Festival 2023: A Record-Breaking Culinary Celebration!

As we set foot in the vibrant town of Lucban, we were not only greeted by the cool breeze but also by the splendid Pahiyas arc adorned with vibrant colors and intricate designs. The cool and refreshing air was filled with excitement, signaling the start of the highly anticipated "Longest Habhaban sa Lucban" during the 2023 Pahiyas Festival!


People from all walks of life came together to form a long line that seemed to stretch over 2 kilometers, starting from the Municipal Hall and extending all the way to the renowned Kamay ni Hesus. It was an extraordinary and awe-inspiring sight, a testament to their joy and enthusiasm for this remarkable event."




As we made our way through the crowd, the aroma of Pancit Lucban filled the air. The honorable mayor of Lucban, Quezon himself took charge of the cooking, ensuring that each plate of this delectable dish was prepared with love and perfection.



Now, let me sprinkle in some fun and witty trivia for you about Pancit Habhab, the Pahiyas Festival, and Lucban, Quezon! Did you know that Pancit Habhab got its name because it is traditionally eaten without any utensils? Yes, that's right! It's a delightful challenge where you slurp up the delicious noodles directly from a banana leaf plate.







And here's another tidbit: The Pahiyas Festival is celebrated every May in honor of San Isidro Labrador, the patron saint of farmers. During this lively event, the streets of Lucban come alive with vibrant decorations made from colorful rice wafers, vegetables, and other agricultural products. It's a feast for the eyes and the taste buds!


As we finally reached the front of the line, our taste buds tingled with anticipation. The first bite of Pancit Lucban was nothing short of heavenly. The flavorful combination of noodles, vegetables, and spices danced on our tongues, leaving us craving for more.



The "Longest Habhaban sa Lucban" was more than just a culinary adventure. It was a celebration of community, culture, and the joy of sharing a meal together. As we indulged in the scrumptious Pancit Lucban, we couldn't help but feel a sense of belonging, as if we were partaking in a tradition that has been cherished for generations.




So, if you ever find yourself in Lucban, Quezon during the Pahiyas Festival, make sure to join the vibrant queue of the "Longest Habhaban sa Lucban." Immerse yourself in the lively atmosphere, enjoy the company of fellow food enthusiasts, and savor the delectable Pancit Lucban. It's an experience that will leave you with a satisfied belly and beautiful memories to cherish.