Limit word count inside a cell

Red_Blues

New Member
Joined
Nov 18, 2021
Messages
1
Office Version
  1. 365
Platform
  1. MacOS
Hello everyone,

I am writing sentences (9000 of them) within a given word count guideline ( min 9 and max 17 ) and I am looking for a way to somehow set up an alert ( change writing color, pull a flag,etc ) if the word count within each cell falls below or goes above.
Not great with excel I must admit, but I am confident there is a way.

If someone out there has an idea, would be fantastic.

Thank you so much
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
The problem you face is that while entering characters into a cell, you can't run any vba/macro code.

You can trigger a code to run upon selecting a cell or pressing enter in a cell, but no code can be ran as each character is entered into a cell because you are in 'Edit Mode' when you are entering characters into a cell, thus no code can be executed during that time. :(
 
Upvote 0
About the closest I can think of to obtaining your goal is to set it up so when you click on a cell, you could have it indicate, via color, if the number of words are within the accepted amount, for example red text for outside the accepted amount of words and green text if it is within the accepted amount of words.
 
Upvote 0
My thinking, not test (never done before)
Use Key_press (KeyAscii) even to catch spacebar even, then count
if Keyascii=32 then
count=count+1
If count<7, text font colour "red"
If count>7 and <17: black (or green)
>17: turns red again
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,717
Members
449,050
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top