Wilder1626
asked on
VBA Excel - Find Text in in Red from column B
Hi
I have this excel file where in column B from Sheet1 i have cells where some words may be in red.
I would like to create a macro that will generate a list of unique words including the counts of each.
Example:
In sheet 1 i can have this:
Once i hit the commandButton, it would generate the list of words in red including the counts.
Ex:
How can i do that?
Thanks for your help
I have this excel file where in column B from Sheet1 i have cells where some words may be in red.
I would like to create a macro that will generate a list of unique words including the counts of each.
Example:
In sheet 1 i can have this:
Once i hit the commandButton, it would generate the list of words in red including the counts.
Ex:
How can i do that?
Thanks for your help
ASKER
Good question.
I only want to count if the text is in red only.
I may have about 35000 rows of data and i may have a lot of red text also.
I only want to count if the text is in red only.
I may have about 35000 rows of data and i may have a lot of red text also.
Okay can you have more then one word red in the same sentence or in the same cell??
Saurabh...
Saurabh...
ASKER
Yes, it can also happen that i have more than one word in red in the same cell.
Now i have last question to this before i design a macro for you..between the two words i.e. red and black or even red and red will you always have space as shown in your example??
ASKER
So i see you got a underscore their..so i can safely say the letter will break once the alphabet gets over now it doesn't matter whether you have underscore or space.. The reason im asking is that their is no way i can think a logic can be written when you have data like this..
redblackred
And you just want to see count of the word red since it's font is red and you want to see count-->2
Or it's like..
areisred
Where are and is and red all in red font and you want to see the count of all of them..So that's why i'm confirming that either its space or underscore and their won't be any continuation like i talked to you in above examples...
Saurabh...
redblackred
And you just want to see count of the word red since it's font is red and you want to see count-->2
Or it's like..
areisred
Where are and is and red all in red font and you want to see the count of all of them..So that's why i'm confirming that either its space or underscore and their won't be any continuation like i talked to you in above examples...
Saurabh...
ASKER
I just went over some weird words in cells and here are some examples:
I don't see any underscore.
Do you still see that it will not be possible or very hard?
The distance time option is not allowed for 'Canceled' Load ^1.
Distance Time is not allowed for 'Canceled' Shipment ^1.
The distance time option is not allowed for 'Canceled' Trip ^1.
Distance Time is not allowed for 'Purged' Shipment Leg ^1.
The address was changed and existing Distance Overrides referencing the old address might be invalid. Please indicate what should happen to these overrides.
Warning: Rating is not valid.
Distance/Transit Time Override ^1 created.
Distance/Transit Time Override created for ^1 ^2.
Distance/Transit Time Override with the same Distance Engine Version, Division Code, Tariff / Service combination, First / Second Locations already exists.
Distance/Transit Time override ^1 deleted.
There are no Distance/Transit Time Overrides defined.
Distance/Transit Time Override removed for ^1 ^2.
Distance/Transit Time Override Details State must be empty.
Distance/Transit Time Override Details State is mandatory.
Distance/Transit Time Override Details Country and State must be equal to First Location.
Distance/Transit Time Override Details are mandatory.
Distance/Transit Time Override Details Country and State must be equal to Second Location.
First and Second Locations are identical. Distance/Transit Time Override cannot be created.
Distance Engine cannot be set to '^1' when countries associated with the two addresses refer to the same Distance Engine ('^2').
Tariff ^1 doesn't have service ^2.
First and Second Locations are mandatory.
Business Hours for ^1 ^2 created.
'^1' must be earlier than '^2' for ^3.
'^1' must be earlier than '^2' for ^3 in '^4' section.
Business Hours don't exist for ^1 ^2.
Business Hours for ^1 ^2 updated.
At least one Business Hour Zone has to be specified when 'All Business Hour Zones' is checked.
I don't see any underscore.
Do you still see that it will not be possible or very hard?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help
Saurabh...