You are not logged in.

  • Login

Dear visitor, welcome to MastersForum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

fast_boozo

Professional

  • "fast_boozo" started this thread

Posts: 1,590

Location: Vechta

Occupation: GER

  • Send private message

1

Friday, February 18th 2005, 11:30pm

excel-vba-frage

nabend

folgende aufgabe:

tabelle - spalte C - telefonnummern(ohne führende 0)

ich möchte jetzt alle zeilen mit telefonnummern löschen, die nicht mit 4 anfangen.

habs bislang mit hilfsspalte gemacht und dort mit

"teil(c4;1;1)"

die erste stelle isoliert, danach mit folgendem makro

lz = Cells(Rows.Count, 1).End(xlUp).Rows.Row
For t = lz To 2 Step -1
If Cells(t, 7).Value <> "4" Then
Rows(t).Delete shift:=xlUp
End If
Next t

die zeilen löschen lassen.

das muss doch auch noch einfacher zu lösen sein.

also entweder die hilfsspalte per makro generieren lassen, oder die abfrage direkt mit ins makro packen.

anschliessend sollen noch doppelte nummern gelöscht und danach sortiert werden, aber das krieg ich wohl selber hin.

Danke schonmal
It's nice to be important, but it's more important to be nice!

LR_Butch

Professional

Posts: 566

Occupation: GER

  • Send private message

2

Saturday, February 19th 2005, 12:15am

Zumindest die Hilfsspalte kannst Dir sparen.
If mid(Cells(t, 3),1,1) <> "4" sollte reichen.

fast_boozo

Professional

  • "fast_boozo" started this thread

Posts: 1,590

Location: Vechta

Occupation: GER

  • Send private message

3

Saturday, February 19th 2005, 12:21am

cool, genau das wars, was ich suchte

many thx