Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Vba

Empfohlene Antworten

Veröffentlicht

Hallo,

bitte um Hilfe !! Ich muss in einer EXEL Tabelle Felde von A1 bis J50 abfragen.

Wenn in einem der Felder eine 0 steht soll dieser Wert gelöscht werden so das in dem Feld nix mehr steht. Als Schleife

bisher habe ich das geschafft

Sub test()

Dim position

position = Range("A1")

curser = Cells(1, 1).Select

If position = ("0") Then position = Selection.ClearContents

End Sub

hier wird aber nur der Inhalt von A1 gelöscht wenn dieser eine 0 ist

wenn ein anderer Zahlenwert drinn steht bleibt er das ist auch richtig so !!

Wie bekomme ich es in eine Schleife das alle anderen Felder geprüft werden !!

;)

Danke !!!!

nimm Range() oder Cells() in die schleife und setze sie dementsprechend.

Range(Spalte & Zeile)

oder

Cells(Spalte, Zeile).Select

Range setzt allerdings einen alphanumerischen wert voraus, d.h. du musst Spalte bei Range dementsprechend von numerisch in alpha umwandeln, indem du Chr(Spalte+64) rechnest. 64 deshalb, weil das "A" die 1. spalte ist und "A" das 65. zeichen nach ASCII ist.

s'Amstel

Hallo

ist schon mal ne Hilfe aber mit der Schleife brauch ich noch Hilfe !

Was für einen Schleifentyp nehme ich am besten ??

Kannst Du mit nicht mal alles in einem Block schreiben ;)

danke !!!

Hi,

ich habe mir was gebaut, funktioniert auch hast Du eine bessere Lösung.

Sauberer ??? Besser ????

Sub test02()

Dim ende_spalte As Integer

Dim ende_reihe As Integer

ende_reihe = 100

ende_spalte = 25

For i = 1 To ende_spalte Step 1

For x = 1 To ende_reihe Step 1

If Worksheets("Tabelle1").Cells(x, i).Value = "0" Then

Worksheets("Tabelle1").Cells(x, i).Value = ""

End If

Next x

Next i

End Sub

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.