-
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
-
Use of Gmail rejected.
by
CBFPD-Chief115
2 hours, 4 minutes ago -
WuMgr operational questions
by
Tex265
2 hours, 49 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
7 hours, 52 minutes ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
4 hours, 53 minutes ago -
Backing up Google Calendar
by
CWBillow
14 hours, 20 minutes ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
1 day, 2 hours ago -
File Naming Conventions (including Folders)
by
Magic66
1 hour, 42 minutes ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
1 day, 10 hours ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
20 hours, 53 minutes ago -
Outlook 2024 importing Calendar and Contacts – FAILURE
by
Kathy Stevens
3 hours, 11 minutes ago -
Adding Microsoft Account.
by
DaveBRenn
1 day, 11 hours ago -
Windows 11 Insider Preview build 26120.3576 released to DEV and BETA
by
joep517
2 days, 11 hours ago -
Windows 11 Insider Preview Build 22635.5090 (23H2) released to BETA
by
joep517
2 days, 11 hours ago -
Windows 11 won’t boot
by
goducks25
4 hours ago -
Choosing virtual machine product for Windows on Mac
by
peterb
2 days, 1 hour ago -
Rest in Peace
by
Roy Lasris
3 days, 5 hours ago -
CISA : Install Windows March 2025 Updates until April 1 or shut down PC.
by
Alex5723
3 hours, 35 minutes ago -
Google proposes users with incompatible Win 11 PCs to migrate to ChromeOS Flex
by
Alex5723
3 days, 6 hours ago -
Drivers for Epson Perfection V600 Photo – scanner
by
Bookman
2 days, 11 hours ago -
Long Time Member
by
jackpet
3 days, 9 hours ago -
Woody Leonhard (1951–2025)
by
Will Fastie
4 hours, 43 minutes ago -
What I learned from Woody Leonhard
by
B. Livingston
3 days, 2 hours ago -
Windows Settings today
by
Simon Bisson
3 days, 17 hours ago -
Mail Merge magic in Microsoft Word
by
Peter Deegan
15 hours, 21 minutes ago -
Businesses in the crosshairs
by
Susan Bradley
2 days, 7 hours ago -
Double-row taskbar?
by
CWBillow
22 hours, 53 minutes ago -
Upgrading non-supported HW to Win 11
by
RetiredGeek
1 day, 8 hours ago -
Audio locks up after 15 minutes
by
WSArthurR
1 day, 7 hours ago -
Copilot app uninstalled
by
Susan Bradley
1 day, 6 hours ago -
Strongbox Password Manager Sold to Applause Group – Cost Escalation Imminent
by
Paul T
5 days, 3 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.