-
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.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
6 hours, 22 minutes ago -
Office apps read-only for family members
by
b
8 hours, 58 minutes ago -
Defunct domain for Microsoft account
by
CWBillow
5 hours, 50 minutes ago -
24H2??
by
CWBillow
1 hour ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
17 hours, 44 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
10 hours, 57 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
5 hours, 47 minutes ago -
two pages side by side land scape
by
marc
2 days, 6 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
2 days, 8 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
1 day, 11 hours ago -
Security Essentials or Defender?
by
MalcolmP
1 day, 14 hours ago -
April 2025 updates out
by
Susan Bradley
9 hours, 28 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
1 day, 7 hours ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
21 hours, 56 minutes ago -
Creating an Index in Word 365
by
CWBillow
2 days ago -
Coming at Word 365 and Table of Contents
by
CWBillow
12 hours, 30 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
3 days, 3 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
3 days, 7 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
3 days, 9 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
3 days, 7 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
3 days ago -
I installed Windows 11 24H2
by
Will Fastie
1 day, 6 hours ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
3 days, 12 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
5 hours, 55 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
3 days, 20 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
3 days, 5 hours ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
3 days, 5 hours ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
4 days, 13 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
4 days, 22 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
21 hours, 56 minutes 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.