What is 2 identical consecutive characters

Duplicates: mark consecutive characters
authormessage
guest



Posted:
Nov 13, 2008, 4:19 pm
First name:

       Version: Office 2007

Hello everybody,

I am faced with the following problem: In a query of all cities, all identical cities should be marked with x consecutive characters.
At the end, all identical characters consecutive with x (e.g. 5) should be marked within a column.
Small example:
Column A:
Hind clamp
Berg am Stein
Ausgburg
Munich
Munich in Saxony
Mountain in the hinterland
...

So far I have found the following posts in the internet forums:
1) http://www.online-excel.de/excel/singsel_vba.php?f=117

2) http://www.office-loesung.de/ftopic256182_0_0_asc.php

To 1) Works wonderfully, but only identical cells are marked. The contents such as "Berg am Stein" and Berg im Hinterland "are not recognized because they are not identical.

Regarding 2) Except for the special display of the result, I could well imagine that the macro works. However, no more detailed information is available. With my "limited" macro knowledge, I can get no further.

Could you combine the two macros?

Thanks in advance for your help!
Kuwe
Excel users with VBA


Posted:
Nov 13, 2008, 8:25 pm
Call name: Uwe

       Version: Office 2007

Hello,

to 1)

replace the line in

Code:
For lngZ = 1 To lngC
strZeile = strZeile & CStr (varAuswahl (lngZ) (lngZeile, 1))
Next lngZ


so:

Code:
For lngZ = 1 To lngC
strZeile = strZeile & Left (CStr (varAuswahl (lngZ) (lngZeile, 1)), 5)
Next lngZ

_________________
greetings Uwe
guest



Posted:
Nov 14, 2008, 3:52 pm
First name:

    UpAll times are
GMT + 1 hour
You can Post in this forum.
You can Reply to posts in this forum.
You can your posts in this forum Not to edit.
You can your posts in this forum Not Clear.
You can to polls in this forum Not participate.
You can Files in this forum Not Post
You can Download files in this forum

Related topics
Forum / Topics reply author Calls last contribution
Excel formulas: Highlight cells in color10Pampos1078May 01, 2007, 8:22 pm
Jürgen_H
Excel formulas: first character in number field and "0" with left suc8fischi01780Apr 19, 2007, 7:11 pm
fridgenep
Excel formulas: Numbers from "master column" in column A + B accordingly3yoogula777583March 01, 2007, 10:17 am
tom_r
Excel formulas: Compare columns and mark the value4dwcappeln573Feb 27, 2007, 10:05 pm
fridgenep
Excel formulas: counting characters2RedSmurf472Jan 29, 2007, 1:44 pm
RedSmurf
Excel formulas: Automatically display numbers in characters12Manni553134Jan 22, 2007, 9:47 pm
Thomas Ramel
Excel formulas: about 1300 characters are not displayed optimally in the cell2sisqonrw671Jan 17, 2007, 5:17 pm
sisqonrw
Excel formulas: set characters1sisqonrw694Nov 24, 2006, 12:30 pm
Willie
Excel formulas: end up, mark, delete with macro10detlef421290Nov 21, 2006, 4:13 pm
Detlef 42
Excel formulas: mark cell when today's date is reached?1Messla1501Nov 13, 2006, 3:04 pm
< Peter >
Excel formulas: output characters up to a certain character10emko673Sep 15, 2006, 2:32 pm
guest
Excel formulas: cell formatting to 6 characters2Benjamin 1982130722 Aug 2006, 8:38 am
Benjamin 1982