Saturday, October 31, 2009

Number to Word - For Excel

Creating the Numbers-to-Words Function in Excel
Step 1 Open the Microsoft Excel program.

Step 2 Hold down the Alt key and press F11 to open the Visual Basic Editor.

Step 3 Choose "Insert" from the main toolbar and click "Module."

Step 4 Copy and paste or type the following Microsoft formula into the module:

Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
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
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
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 Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = 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 = 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

Step 5 Choose SpellNumber from the module's pull-down menu.

Changing Numbers to Words in a Spreadsheet
Step 1 Open an Excel spreadsheet.

Step 2 Select the cell in which you want to convert numbers to text by clicking on the cell.

Step 3 Click the Paste/Insert Function tab (fx).

Step 4 Click "User Defined" in the left-hand menu and click "SpellNumber" in the right-hand menu.

Step 5 Type in the number that you want converted to words.

Step 6 Click "OK." The number will appear in the cell as text.

Friday, July 24, 2009

Disable DEP - useful tip to run DVRDNS

•In the Start Menu, navigate to All Programs, then Accessories.
•In the Accessories menu, right click on “Command Prompt” and select “Run as administrator.“
•You may need to provide Administrator credentials at this point.
•In the Command Prompt window, type “bcdedit.exe /set {current} nx AlwaysOff” and press Enter.
•You should see “The operation completed successfully.“
•Close the Command Prompt.
REBOOT - compulsary

Saturday, May 9, 2009

Nokia Universal codes

Code Description :These Nokia codes will work on most Nokia Mobile Phones

(1) *3370# Activate Enhanced Full Rate Codec (EFR) - Your phone uses the best sound quality but talk time is reduced by approx. 5%
(2) #3370# Deactivate Enhanced Full Rate Codec (EFR) OR *3370# ( Favourite )
(3) *#4720# Activate Half Rate Codec - Your phone uses a lower quality sound but you should gain approx 30% more Talk Time.
(4) *#4720# Deactivate Half Rate Codec.
5) *#0000# Displays your phones software version, 1st Line : Software Version, 2nd Line : Software Release Date, 3rd Line : Compression Type. ( Favourite )
(6) *#9999# Phones software version if *#0000# does not work.
(7) *#06# For checking the International Mobile Equipment Identity (IMEI Number). ( Favourite )
(8) #pw+1234567890+1# Provider Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(9) #pw+1234567890+2# Network Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(10) #pw+1234567890+3# Country Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(11) #pw+1234567890+4# SIM Card Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(12) *#147# (vodafone) this lets you know who called you last.
(13) *#1471# Last call (Only vodofone).(14) *#21# Allows you to check the number that "All Calls" are diverted to
(15) *#2640# Displays security code in use.
(16) *#30# Lets you see the private number.
(17) *#43# Allows you to check the "Call Waiting" status of your phone.
(18) *#61# Allows you to check the number that "On No Reply" calls are diverted to.
(19) *#62# Allows you to check the number that "Divert If Unreachable (no service)" calls are diverted to.
(20) *#67# Allows you to check the number that "On Busy Calls" are diverted to.
(21) *#67705646# Removes operator logo on 3310 & 3330.(22) *#73# Reset phone timers and game scores.
(23) *#746025625# Displays the SIM Clock status, if your phone supports this power saving feature "SIM Clock Stop Allowed", it means you will get the best standby time possible.24) *#7760# Manufactures code.
(25) *#7780# Restore factory settings.
(26) *#8110# Software version for the nokia 8110.
(27) *#92702689# Displays - 1.Serial Number, 2.Date Made, 3.Purchase Date,
(28) *#94870345123456789# Deactivate the PWM-Mem.
(29) **21*number# Turn on "All Calls" diverting to the phone number entered.
(30) **61*number# Turn on "No Reply" diverting to the phone number entered.
(31) **67*number# Turn on "On Busy" diverting to the phone number entered.
(32) 12345 This is the default security code.

Saturday, May 2, 2009

Re: WSS v3 Install Fails with "Failed to register DLL with PerfMon
--------------------------------------------------------------------------------
In case anyone else encounters this issue the fix is to runlodctr /rto repair the perfmon registry entries Error 26251

Tuesday, April 28, 2009

Stop User Account Control (UAC) screen flicker / flash

Every time I get one of those UAC prompts asking me to authorize an administrative action my LCD screen flashes when the box pops up. This is caused by the switch to the secure desktop, similar to what happens when you hit CTRL + ALT + DELETE. The only difference is that the background is a snapshot of your desktop that gives it the effect that it is just a pop up window. Although if you look carefully you will notice it is static since the clock does not change and anything else that was animated is now static. The secure desktop provides an extra level of security to UAC by making it immune to any application that may try to automate the click on the allow button bypassing the purpose of UAC.
This sounds like a great thing but it is really annoying to me. I hate that screen flicker. Rather than disable UAC, there is a better alternative. Instead, I can just disable the secure desktop switch that causes the flicker. I know this is not as secure but it is better than disabling UAC completely.
Follow the steps below to disable UAC secure desktop:
window.google_render_ad();
1. Click on the Start Button and key in secpol.msc and hit Enter.
2. Navigate through Local Policies and Security Options.
3. Scroll to the bottom and right click on “User Account Control: Switch to the secure desktop when prompting for elevation” and select Properties.
4. Set the option to Disabled and hit OK.