Word Macro 2010 for counting highlights - highlight

I want to know if this can be done? I just want to count the certain highlighted group of words.. not by word by word but by how many highlights does it have.. then will output the number of highlighted items..
Please help me.. Just imagine that the ones that have quotations have colors on it. Hope someone could help me..
Legends: "Red marks" = Wrong spelling and punctuations – Example: "dont, ternd mirco"
5 or more entries of wrong spelled words and punctuations will make your score cards
"Yellow Highlights" = incorrect grammars - Example: "Do you sure?"
2 or more entries of incorrect grammars will make your score cards
"Green Highlights" = inappropriate sentence structure – Example: "Insert CD to USB."
2 or more entries of incorrect sentence structure will make your score cards
There are 2 Red Highlights
There are 2 Yellow Highlights
There are 2 Green Highlights

Related

Add leading zeros in cells with non digits

I have two cells that need to be merged into one, but the formatting needs to be updated. In one cell there are category IDs and in the other cell are subcategory IDs. None of them are formatted to have leading zeros, which isn't too big of a deal because I can just use the number format for that. The problem is that the subcategories sometimes have a letter at the end. Number format completely ignores these and just leaves them be. Is there a formula/combination of formulas I can use to get data to look like this?
Category
Subcat
Output
1
1
01-01
4
12
04-12
21
1
21-01
21
1b
21-01b
EDIT
Sorry about the previous answer. This one is correct
=ArrayFormula(IF(A2:A<>"", IF(LEN(A2:A)=1,"0"&A2:A,A2:A)&"-"&IF(REGEXMATCH(B2:B&"","^\d{1}$|^\d{1}\D")=TRUE,"0"&B2:B,B2:B),""))
WRONG (You can use this)
=ArrayFormula(IF(A2:A<>"", IF(LEN(A2:A)=1,"0"&A2:A,A2:A)&"-"&IF(LEN(B2:B)=1,"0"&B2:B,B2:B),""))
try:
=INDEX(IFNA(TEXT(A1:A, "00-")&
TEXT(REGEXEXTRACT(B1:B&"", "\d+"), "00")&
IFERROR(REGEXEXTRACT(B1:B, "\D+"))))
Try:
=IF(ISNUMBER(A2), TEXT(A2,"00"), TEXT(LEFT(A2,LEN(A2)-1),"00")&RIGHT(A2))&"-"&IF(ISNUMBER(B2), TEXT(B2,"00"), TEXT(LEFT(B2,LEN(B2)-1),"00")&RIGHT(B2))
And just paste it in every cell in column C

How to remove Text in the center of a Cell

So I am going around this the long way but what I am trying to do is extract the text in the center of a cell with text on both sides of it.
Example Text is:
Alliance: CRAZY CATS (Neutral)
Alliance: Dark Arts (Yours)
Alliance: Portal (Hostile)
I want to extract everything between : and (
In these cases I only need the name of the alliance the person is in. I tried to do a regedit but didn't completely understand it. I tried a few different formulas but was only able to remove either the first part or the last part and I could push them to two different cells but couldn't get them to work together in the same cell.
You can use REGEX functions, but I find that not everyone understands them. So here, I'll supply a non-REGEX solution.
Supposing your sample data were in A2:A4 (with some header in A1), place the following in B2 (or row 2 of any other column):
=ArrayFormula(IF(A2:A="","",TRIM(MID(A2:A,FIND(":",A2:A)+1,FIND("(",A2:A)-FIND(":",A2:A)-1))))
=REGEXEXTRACT(A2, ":\s*([^(]+)\s*\(")
: literal ":"
\s* zero or more space characters
() capture group
[^(]+ one or more of any character except (
\( literal (
See
What does this regex mean?
Tag info page

Apostrophes in the same string in QUERY Google Sheets function

=TRANSPOSE(QUERY(sorting!A57:A,"select * where A contains '"&$A57&"'"))
This is what I'm currently using to make a word tree based on my A column. I want to find all instances of A57 in the A column and fill the rest of the row with those. I have 2 issues that I can't seem to squash:
If I have an apostrophe it fails (circled in green in the screenshot)
I want whole word matches and not parts of words (circled in red) e.g. "is" should return "is he" "is it" "is it the" and NOT "fish" "wish" etc.
Google Sheet Screenshot
=TRANSPOSE(QUERY(sorting!A1:A,"select * where A matches '.\b"&$A1&"\b.'"))
This solves problem 2. Still affected by problem 1.
SOLVED!
=TRANSPOSE(QUERY(sorting!A1:A,"select * where A matches "".\b"&$A1&"\b."""))
both problems 1 and 2 solved. thanks.

Look up a field that contains a specific letter and return the description/name

I have a six digit code that contains a letter and i want a formula that will look to see if the code contains a certain letter and return the descirption for that code
for example the code field will be 6201-L
L equals Electrical so I want the formula to return "Electrical"
The next code may be 6201-J
J equals Job so I want the formula to return the text "Job"
the letters will always be constant but the numbers can change
i.e. sometime the number will be 6203-J so I also need to use a space holder in the formula so it is only searching for the letter
can anyone help please?
Thanks

Google Spreadsheet - Not calculating numbers with space

I am trying to do a calculation of two cells, where one of them contains a number like this: 1 250.
If the number is written like that, and not 1250, then I cannot get the spreadsheet to do any calculations with it. Google suddenly do not treat it as a legit number anymore.
Why not just type 1250 instead of 1 250?
Well, I am getting the cell values from a html import function.
Any good advice on how to get around this?
Try something like this:
=Substitute(A2," ","")
In this formula, A2 is a cell. You are finding any spaces in that cell and then replacing it with a "non-space".
Use the substitute function to transform your number before using it in a formula. For instance, let's say you wanted to multiple F8 by 2, but F8 may contain spaces. You would then do:
=substitute(F8, " ","") * 2
Substitute didn't work form me. But these steps did:
Select one or several columns of data
Press Ctrl + H to get the "Find and Replace" dialog
Make sure "Search using regular expressions" is checked ✅
Enter \s to the "Find" field, and leave "Replace with" empty
Click on the "Replace all" button
Explanation:
\s is a regular expression matching any kind of whitespace character. There may have been some other kind of whitespace in my spreadsheet, not a regular " " (space) character, and that's why regex worked for me, while SUBSTITUTE() didn't.
I've also tried the REGEXREPLACE(A2, "\s", "") function, but it didn't seem to to anything in my case.

Resources