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.

Excel und VBA....

Empfohlene Antworten

Veröffentlicht

Ich hoffe ich bin hier richtig. Wenn nicht verschiebt den Thread halt.... ;-)

Also, mein Problem:

Ich will in Excel mehrer Werte addieren. Das kann ich ja mit z.B.: Summe(A1:A4). Gut, ich will jetzt aber bestimmte Werte die z.B. die Schriftgröße 12 haben nicht mitaddieren. Gibt es da ne Lösung mit VBA? Bestimmt. Also wäre ich froh wenn mir einer Hilft!

Danke .... Tim!

Es gibt bestimmt ein Attibut indem die Schriftgröße steht.

Auf dieses prüfst du, ist es 12 dann tue nichts ist es nicht 12 dann

nimm wert = wert + zelle

Der Wert muss am Anfang mit 0 initialisiert sein.

Das wäre dann wohl 'fontsize'.

Ich kenn mich nur mit dem Excel-VBA nicht so aus. Mit nur am Access-Programmieren.

Was ich damit sagen will: Wie greife ich auf die Zellen zu?

MsgBox (Worksheets("Tabelle1").Cells(1, 1).Font.Size)

gibt die Schriftgröße der Zelle A1 aus.

MsgBox (Worksheets("Tabelle1").Cells(2, 1).Font.Size)

gibt die Schriftgröße der Zelle A2 aus.

MsgBox (Worksheets("Tabelle1").Cells(1, 2).Font.Size)

gibt die Schriftgröße der Zelle B1 aus.

Und dann sollte es doch kein Prob mehr sein oder?

int zeile;

float wert = 0;

for(zeile = 1; zeile <= 100; zeile++) {

if(Worksheets("Tabelle1").Cells(zeile, 1).Font.Size != 12)

wert = wert + Worksheets("Tabelle1").Cells(zeile, 1).Value;

} //for

cout << wert;

Sollte funktionieren (musst nur noch den entsprechenden VBA code einsetzen)

Aber leider ist mir es zu spät um das heute noch auszuprobieren. Ich mach jetzt Feierabend!

Machts gut Jungs und Mädels,

Tim

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.