-
WSkjktoo
AskWoody LoungerOn the subject of clipboard extenders…I use ClipCache and get the same error message in Excel 2000, however it has always copied & pasted the entire selection for me despite the error messages.
Ken
-
WSkjktoo
AskWoody LoungerHi Andrew,
I was copying these *very useful* functions into my personal library when I noticed two typos. So in case anyone else wants to do the same I thought I’d let you know.
Function CellColorCount(fRange As Range, fCol) As Long Application.Volatile True Dim Rng As Range For Each Rng In fRange If Rng.Interior.ColorIndex = fCol And Rng.Value "" Then ColorCount = ColorCount + 1 End If Next End Function
Function CellColorSum(fRange As Range, fCol) As Double Application.Volatile True Dim Rng As Range For Each Rng In fRange If Rng.Interior.ColorIndex = fCol Then ColorSum = ColorSum + Rng.Value End If Next End Function
The lines reading
ColorSum = ColorSum + Rng.Value
ColorCount = ColorCount + 1should read
CellColorSum = CellColorSum + Rng.Value
CellColorCount = CellColorCount + 1I appreciate all the effort you put in here at the Lounge to help out those less knowledgeable like myself.
Ken
P.S. What does Application.Volatile True do?
-
WSkjktoo
AskWoody LoungerHans,
Thanks for pointing me in the right direction. It took me a while to figure out that GetKeyState returns bit 8 on when a button is clicked with the shift key down, and bit 1 gets toggled by the key up event. Once I got that, the rest went well.
Ken
-
WSkjktoo
AskWoody LoungerThanks to Andrew and Rory for their help.
Here’s the final code I’m using. Seems to be working fine.
Option Explicit Public Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range) Dim work As String Dim i As Long On Error GoTo Goodbye work = Target.Formula If Right(work, 1) "-" Then Exit Sub work = Left(work, Len(work) - 1) If IsNumeric(work) Then work = "-" & work If Application.FixedDecimal = False Then Target.Formula = work Else Target.Formula = Val(work) * 0.01 End If End If Goodbye: End Sub
Ken
-
WSkjktoo
AskWoody LoungerThank you Andrew and Rory. I’ll get report back to you on this in a couple of days when I have a chance to try it.
Ken
-
WSkjktoo
AskWoody LoungerAndrew, Thanks much for responding. The macro is in the workbook module, and I added the lines you suggested. However, It still changes the cell below the one I just entered. Any more ideas would be appreciated.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Dim i As Long Dim work As String Application.EnableEvents = False ' enter your code here work = ActiveCell.Formula If Right(work, 1) = "-" Then If IsNumeric(Left(work, Len(work) - 1)) Then ActiveCell.Formula = "-" & Left(work, Len(work) - 1) End If End If Application.EnableEvents = True End Sub
TIA
Ken -
WSkjktoo
AskWoody LoungerJohn,
This is a little late, but it works in XL2K. Select all the identical sheets you want to print, then select the cells you want to print on the first sheet. Press Ctrl-P or do File | Print and click the “Print Selection” option button. Print Preview then shows that all the selected sheets will print just that selected area. No need to set a print area at all.
kjk
-
WSkjktoo
AskWoody LoungerGeoff,
When you click in the Refers to box are you in Edit Mode?
Check the status bar. If not, press F2.Hope this is helpful.
Ken -
WSkjktoo
AskWoody LoungerHi again,
Strange, what you say. After I click on the refers to box in the Define Name Dialog box, my status bar shows that F2 toggles between “Enter” and “Edit”. In the Edit mode I have no problem editing in the Refers To box.
-
WSkjktoo
AskWoody LoungerTry this link to read about NotesPad
http://members.nbci.com/_XMCM/newbienet2/N…otespad_32.html%5B/url%5D
I’ve used it for years and think its great.
kjktoo
-
WSkjktoo
AskWoody LoungerHere’s what I use to fix trailing negatives. I also use it to fix negatives in angled brackets which I get if I import reports from the AS400 spool file. It also skips dashed lines that I get from those reports.
I’m almost embarrassed. My code isn’t nearly as sophisticated as what I’ve seen so far, but it seems to work OK for me.
Option Explicit Sub FixNeg() Dim myCell As Range Dim i As Long Dim Work As String For Each myCell In Selection myCell.Value = Trim(myCell.Value) If Right(myCell.Value, 1) = "-" And Right(myCell.Value, 2) "--" _ Or Right(myCell.Value, 1) = ">" Then Work = "-" For i = 1 To Len(myCell.Value) - 1 If InStr(".0123456789", Mid(myCell.Value, i, 1)) > 0 Then Work = Work & Mid(myCell.Value, i, 1) End If Next i myCell.Value = Work End If Next myCell End Sub
End Sub
![]() |
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
-
*Some settings are managed by your organization
by
rlowe44
6 hours, 26 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
8 hours, 40 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
9 hours, 5 minutes ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
18 hours, 5 minutes ago -
AI slop
by
Susan Bradley
17 hours, 16 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
19 hours, 22 minutes ago -
Two blank icons
by
CR2
4 hours, 55 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 4 hours ago -
End of 10
by
Alex5723
1 day, 6 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
4 hours, 51 minutes ago -
test post
by
gtd12345
1 day, 12 hours ago -
Privacy and the Real ID
by
Susan Bradley
1 day, 3 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
19 hours, 11 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
1 day, 17 hours ago -
Upgrading from Win 10
by
WSjcgc50
5 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
8 hours, 34 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
2 days, 8 hours ago -
The story of Windows Longhorn
by
Cybertooth
1 day, 20 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 days, 10 hours ago -
Are manuals extinct?
by
Susan Bradley
4 hours, 37 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
2 days, 20 hours ago -
Network Issue
by
Casey H
2 days, 7 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
3 days, 8 hours ago -
May 2025 Office non-Security updates
by
PKCano
3 days, 8 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
3 days, 10 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
2 days, 11 hours ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 days, 12 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 days, 12 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
3 days, 20 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
5 hours, 6 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.