-
WSJim Cone
AskWoody LoungerGraig,
Thanks for pointing that out.
That wasn’t my algorithm and my expertise (if any) lies elsewhere.The “Int” functions in the code could be changed to “Fix” functions and that would handle the positive/negative issue.
Int rounds negative numbers down while Fix truncates them.
The displayed answer, however, would have multiple minus signs.
Following your suggestion about using the absolute value, I’ve modified the code using that approach…‘–
Function Convert_Degree(ByRef Decimal_Deg As Variant) As Variant
Dim Degrees As Double
Dim Minutes As Double
Dim Seconds As Double
Dim strSign As StringIf Not IsNumeric(Decimal_Deg) Then
Convert_Degree = “Number Required”
Exit Function
Else
If Sgn(Decimal_Deg) > -1 Then
strSign = ” ”
Else
strSign = “-”
End If
Decimal_Deg = Abs(Decimal_Deg)
End If‘Set degree to Integer of Argument Passed
Degrees = Int(Decimal_Deg)
‘Set minutes to 60 times the number to the right
‘of the decimal for the variable Decimal_Deg
Minutes = (Decimal_Deg – Degrees) * 60
‘Set seconds to 60 times the number to the right of the
‘decimal for the variable Minute
Seconds = Format$(((Minutes – Int(Minutes)) * 60), “0.0###”)
‘Returns the Result of degree conversion
‘(for example, 10.46 = 10~ 27 ‘ 36″)
Convert_Degree = strSign & Degrees & “° ” & Int(Minutes) & “‘ ” _
& Seconds & Chr$(34)
End Function
‘–Jim Cone
Portland, Oregon USA
Primitive Software Files -
WSJim Cone
AskWoody LoungerApplication.DisplayAlerts = False
‘ Your code
Application.DisplayAlerts = TrueAlso, add… Application.DisplayAlerts = True to your error handler.
‘–
Jim Cone
Portland, Oregon USA
http://tinyurl.com/SpecialSort -
WSJim Cone
AskWoody LoungerYou didn’t mention the xl version you are using or on what line the error occurs.
My guess is that…
For Each Wks In Workbooks(“CHEX”).SheetsShould be…
For Each Wks In Workbooks(“CHEX.xls”).Sheets
‘–
Jim Cone
Portland, Oregon USA
XL Companion add-in -
WSJim Cone
AskWoody LoungerIf you are calling the function from a worksheet cell (instead of calling it using code) then
Replace…
If TypeName(Decimal_Deg) “Double” Then
Convert_Degree = “Number required”
Exit Function
End IfWith…
If Not IsNumeric(Decimal_Deg) Then
Convert_Degree = “Number Required”
Exit Function
End If–or–
Just remove those 4 lines.
That code segment is useful only if someone not familiar with your workbook is using it.
‘–
Jim Cone
Portland, Oregon USA
Special Sort add-in review -
WSJim Cone
AskWoody LoungerChange this line…
Seconds = Format(((Minutes – Int(Minutes)) * 60), “0”)
To…
Seconds = Format(((Minutes – Int(Minutes)) * 60), “0.0###”)
‘–Going a little further, I did some cleanup on the code…
Function Convert_Degree(ByRef Decimal_Deg As Variant) As Variant
Dim Degrees As Double
Dim Minutes As Double
Dim Seconds As DoubleIf TypeName(Decimal_Deg) “Double” Then
Convert_Degree = “Number required”
Exit Function
End If‘Set degree to Integer of Argument Passed
Degrees = Int(Decimal_Deg)
‘Set minutes to 60 times the number to the right
‘of the decimal for the variable Decimal_Deg
Minutes = (Decimal_Deg – Degrees) * 60
‘Set seconds to 60 times the number to the right of the
‘decimal for the variable Minute
Seconds = Format(((Minutes – Int(Minutes)) * 60), “0.0###”)
‘Returns the Result of degree conversion
‘(for example, 10.46 = 10~ 27 ‘ 36″)
Convert_Degree = ” ” & Degrees & “° ” & Int(Minutes) & “‘ ” _
& Seconds & Chr(34)
End Function
‘–
Jim Cone
Portland, Oregon USA
Extras for Excel add-in -
WSJim Cone
AskWoody LoungerA few hundred charts in a workbook will probably cause problems.
If you don’t have that many, you could try moving a sheet at a time to another workbook and test the new workbook after each sheet is added.
You may find one sheet/charts that is causing the trouble. (or you may not).
Of course, if your problems exists in nearly all workbooks then the above is a time waster.On the other hand, the problem could be hardware related.
This diagnostic tool (from Microsoft) helped me out one time by finding a bad ram chip…
Windows Memory Diagnostic
Even if your problem is something else (most likely) this tool is nice to have in the drawer.
Good Luck,
‘–
Jim Cone
Portland, Oregon USA
Excel add-ins -
WSJim Cone
AskWoody LoungerRe: “What does that mean?”
I don’t know. And my idea bag is pretty limited.
You should make sure your printer drivers are up to date and if that
makes no difference try another printer on your system.
‘–
Jim Cone
Portland, Oregon USA
Special Sort add-in -
WSJim Cone
AskWoody Lounger1. Clearing the Windows Temp file won’t hurt anything and off times makes most things better… Start | Run | %temp%
2. Does the problem occur with just one/two particular files?
….If so what is the file size? Are there are large number of charts or objects… Home (tab) | Find & Select | Go to Special | Objects
….Are there a large number of Styles? 50 or so is normal in xl2007, several thousand and you are in trouble.
3. xl2007 comes with a “Diagnostics” utility… Big Round Button | Excel Options (button) | Resources | Run…Diagnostics.
‘–
Jim Cone
Portland, Oregon USA
Cleanup Formats/Styles add-in -
WSJim Cone
AskWoody Lounger=MOD(INT((ROW()-1)/3),2)=1
‘–
Jim Cone
Portland, Oregon USA
Shade Data Rows add-in -
WSJim Cone
AskWoody Lounger0.## as a custom number format will do that.
The decimal point will be displayed, however, in all numbers…
2 as 2.
‘–
Jim Cone
Portland, Oregon USA
Special Sort add-in -
WSJim Cone
AskWoody LoungerMS changed the syntax for sorting in xl2007.
It added no real value. They have no shame.
The following should work in all XL versions from xl97 thru xl2007.
There may be other “improvements” in xl2010 ?
‘–
Sub UniversalSort()
With ActiveSheet
.Columns(“A:F”).Sort key1:=.Range(“E2″), _
order1:=xlDescending, header:=xlYes, _
MatchCase:=False, Orientation:=xlTopToBottom
End With
End Sub
‘–
Jim Cone
Portland, Oregon USA
Review: Special Sort add-in -
WSJim Cone
AskWoody LoungerSuggest you change…
lLinkTest = InStr(1, lCell.Value, “.xls]”)To…
lLinkTest = InStr(1, lCell.Formula, “.xls]”)Also that check will always return 0 for a xl2007 workbook extension.
You might want to just check for both a bracket and an exclamation point.Your check will be quick but not complete as you can also have links in charts, shapes, hyperlinks, names, pivot tables and ?
‘–
Jim Cone
Portland, Oregon USA
( Special Sort add-in ) -
WSJim Cone
AskWoody LoungerXL2003 has a Link Sources method that returns an array of links in a workbook.
I haven’t tested it, but I suspect it may not find every type of link possible.
For something quick and dirty you can do a UsedRange search for a bracket… “[”
‘–
Jim Cone
Portland, Oregon
XL add-ins -
WSJim Cone
AskWoody LoungerThe Find Link Excel add-in from Bill Manville was updated in February 2009.
I have not tried it on xl2007 maybe you should and let us know…
FinkLinkJim Cone
Portland, Oregon USA
Special Sort -
WSJim Cone
AskWoody LoungerYour goal seek cell (E19) does not have a formula in it. So changing other cells will not have any effect on that cell.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
31 minutes ago -
X Suspends Encrypted DMs
by
Alex5723
2 hours, 43 minutes ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
3 hours, 1 minute ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
3 hours, 38 minutes ago -
OpenAI model sabotages shutdown code
by
Cybertooth
4 hours, 15 minutes ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
3 hours, 39 minutes ago -
Enabling Secureboot
by
ITguy
7 hours, 25 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
12 hours, 9 minutes ago -
No more rounded corners??
by
CWBillow
7 hours, 58 minutes ago -
Android 15 and IPV6
by
Win7and10
1 hour, 58 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
1 day ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
1 day, 3 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
21 hours, 47 minutes ago -
Windows Update orchestration platform to update all software
by
Alex5723
1 day, 10 hours ago -
May preview updates
by
Susan Bradley
21 hours, 54 minutes ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
13 hours, 30 minutes ago -
Just got this pop-up page while browsing
by
Alex5723
1 day, 2 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
23 hours, 47 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
1 hour, 58 minutes ago -
At last – installation of 24H2
by
Botswana12
2 days, 2 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
13 hours, 5 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
2 days, 14 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
12 hours, 41 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
3 days, 3 hours ago -
Another test post
by
gtd12345
3 days, 3 hours ago -
Connect to someone else computer
by
wadeer
2 days, 22 hours ago -
Limit on User names?
by
CWBillow
3 days, 1 hour ago -
Choose the right apps for traveling
by
Peter Deegan
2 days, 15 hours ago -
BitLocker rears its head
by
Susan Bradley
1 day, 23 hours ago -
Who are you? (2025 edition)
by
Will Fastie
1 day, 22 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.