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 zahlen addieren und formatieren

Empfohlene Antworten

Veröffentlicht

hi!

ich hab folgendes problem:

ich geb 3zahlen ein

z.b. 12,12 (zahl1)

12,12 (zahl2)

12,12 (zahl3)

dann lass ich des zusammen rechnen aber dann kommt des raus ( zahlen = zahl1 + zahl2 +zahl2 )

12,1212,1212,12 (zahlen)

jetzt will ich machen das er die zahlen zusammen rechnet und gleichzeitig richtig ausgiebt.

du musst die zahlen auch als zahlen definieren, sonst werden sie als string interpretiert.

dekalariere sie entweder vor der verwendung:

dim zahl1 as double

dim zahl2 as double

dim zahl3 as double

oder caste sie bei der verwendung:

ergebnis = cdbl(zahl1) + cdbl(zahl2) + cdbl(zahl3)

vorzugsweise verwende am beginn deiner module etc.

option explicit

dadurch werden undeklarierte variablen reklamiert.

s'Amstel

ah danke...

ich hatte des vorher auch mit double oder single....

aber da hab ich eins zu viel deklariert ^^

oke jetzt passts xD

danke!

noch was...

wie ist der Befehl, dass man 2nachkommastellen ausgibt?

verwende die "format"-funktion oder, besser, eine eigene benutzerfunktion (z.b. eine, die alle formate die du brauchst anbietet).

s'Amstel

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.