Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2020, 02:53 AM
macropod's Avatar
macropod macropod is offline Help to Highlight a cell that has less than 5 characters Windows 10 Help to Highlight a cell that has less than 5 characters Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


For example:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim oCell
For Each oCell In Selection.Tables(1).Range.Cells
  With oCell.Range
    If Len(.Text) > 2 Then
      If Len(.Text) < 7 Then .HighlightColorIndex = wdYellow
    End If
  End With
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 11-07-2020, 03:01 AM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help to Highlight a cell that has less than 5 characters Windows 10 Help to Highlight a cell that has less than 5 characters Office 2019
Competent Performer
Help to Highlight a cell that has less than 5 characters
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Smile Thank you so much, Paul, that works

OMG, why when you do it, it seems so logical, but when I research and try bits of pieces and try to make a script, I don't have it. Keeps giving me errors.

I hope one day to be as logical and have a found understanding to coding like you do.

Thanks a million.
Reply With Quote
Reply

Tags
highlight cells, less than 5 characters



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to Highlight a cell that has less than 5 characters Highlight only the characters ER when it occurs in SEVERE. norgro Word VBA 3 02-18-2013 05:14 PM
Help to Highlight a cell that has less than 5 characters How to highlight the row based on cell value? Learner7 Excel 1 12-11-2011 02:28 AM
Help to Highlight a cell that has less than 5 characters Highlight the first X number of characters 14spar15 Word 1 11-13-2011 11:17 PM
find - reading highlight - highlight all / highlight doesn't stick when saved bobk544 Word 3 04-15-2009 03:31 PM
highlight cell after checkbox flatk Word 0 01-25-2007 12:32 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft