ich würde gerne anhand eines kleinen Makros, das Datum in einer Eingabemaske (Spalte C) eingeben und dafür soll er mir als Ergebnis die Summe der Werte aus Spalte HJ rechnen und anzeigen.
Hat jmd. für mich eine Idee?
Vielen Dank.
Dani
Sub Summe()
Dim Datum As Date
Dim Summe
Datum = InputBox("Datum?", "Filterdatum", Date)
Summe = WorksheetFunction.SumIf(Columns(3), Datum, Columns(218))
MsgBox ("Summe für " & Datum & vbLf & vbLf & Summe)
End Sub
Gruß UweD
B | C | D | E | |
1 | 18.04.2016 | -5379559,19255096 | -5391560,39255096 | |
6925 | 18.04.2016 | -12001,2 |
verwendete Formeln | |||
Zelle | Formel | Bereich | N/A |
E1 | =SUMMEWENN(B:B;HEUTE();C:C) |
Excel-Inn.de |
Hajo-Excel.de |
XHTML-Tabelle zur Darstellung in Foren, einschl. der neuen Funktionen ab Version 2007 |
Add-In-Version 21.10 einschl. 64 Bit |
B | C | |
1 | wwww | |
6922 | 15.04.2016 11:33:26 | -87840 |
6923 | 15.04.2016 12:52:01 | -8736 |
6924 | 15.04.2016 13:42:14 | 8.736 |
Excel-Inn.de |
Hajo-Excel.de |
XHTML-Tabelle zur Darstellung in Foren, einschl. der neuen Funktionen ab Version 2007 |
Add-In-Version 21.10 einschl. 64 Bit |
Dim Datum As Date
Dim Summe
Columns(2).Replace What:=" **:**:**", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Datum = InputBox("Datum für gewünschte Deltaposition angeben:", "Filterdatum", Date)
Summe = WorksheetFunction.SumIf(Columns(2), Datum, Columns(3))
Summe = Format(Summe, "#,##0") & " MWh "
MsgBox ("Deltaposition am " & Datum & ":" & vbLf & vbLf & Summe)
Range("HF1") = Summe