Hi everyone!
Hoping you can help me rethink/rewrite properly the following bit of code; scenario is the following:
In column "A" I have a bunch of words, singular and plural both, and next to each word (column "B") there's a number indicating the number of occurrences for each of them.
What I need basically is to find plurals and singular of the same word (like "House" and "Houses") in column "A", and leave just 1 word adding up the total occurrences for both versions (both plural and singular, House + Houses).
The plural/singular identification doesn't need to be very sophisticated, as long as it recognizes word+s it's ok (as in House + s = Houses).
So to sum it up, it could just merge in one word, let's say the plural version (Houses) and next to it in column B sum the total of occurrences for both.
Here's the bit of code (poorly written, I know) that I though of to identify singular/plural and add the plural version in column "E", counting the number of occurreces:
The rest of the code is completed with a vlookup to find the number, and an autofilter to remove the plural version from column "A".
Anyone think of an easier/better approach?
Thanks a lot!
Hoping you can help me rethink/rewrite properly the following bit of code; scenario is the following:
In column "A" I have a bunch of words, singular and plural both, and next to each word (column "B") there's a number indicating the number of occurrences for each of them.
What I need basically is to find plurals and singular of the same word (like "House" and "Houses") in column "A", and leave just 1 word adding up the total occurrences for both versions (both plural and singular, House + Houses).
The plural/singular identification doesn't need to be very sophisticated, as long as it recognizes word+s it's ok (as in House + s = Houses).
So to sum it up, it could just merge in one word, let's say the plural version (Houses) and next to it in column B sum the total of occurrences for both.
Here's the bit of code (poorly written, I know) that I though of to identify singular/plural and add the plural version in column "E", counting the number of occurreces:
Code:
For Each CellA In Sheet2.Range("A2:A" & Sheet2.Range("A65536").End(xlUp).Row).Cells
LookV = CellA
For Each CellB In Sheet2.Range("A2:A" & Sheet2.Range("A65536").End(xlUp).Row).Cells
If CellB = LookV & "s" Then
Sheet2.Cells(Rows.Count, "E").End(xlUp)(2).Value = CellB
End If
Next CellB
Next CellA
The rest of the code is completed with a vlookup to find the number, and an autofilter to remove the plural version from column "A".
Anyone think of an easier/better approach?
Thanks a lot!