Hi,

I am tryin to sum up the range if the given coditions are met. But unfortunately it aint working properly. It is basically summing up the entire range.

Sub SysDown()

Dim Count As Long

Dim Rowend As Long

Dim Total As String

Count = 2

Rowend = 2

While Cells(Rowend, 3) <> ""

Rowend = Rowend + 1

Wend

Total = 0

While Count <= Rowend

If Cells(Count, 5) = Cells(65528, 3) And Cells(Count, 3) = "System Down" Then

Total = "=Sum(Q2:Q50000)"

End If

Count = Count + 1

Cells(65533, 9) = Total

Wend

End Sub

Can someone please HELP.

I am tryin to sum up the range if the given coditions are met. But unfortunately it aint working properly. It is basically summing up the entire range.

Sub SysDown()

Dim Count As Long

Dim Rowend As Long

Dim Total As String

Count = 2

Rowend = 2

While Cells(Rowend, 3) <> ""

Rowend = Rowend + 1

Wend

Total = 0

While Count <= Rowend

If Cells(Count, 5) = Cells(65528, 3) And Cells(Count, 3) = "System Down" Then

Total = "=Sum(Q2:Q50000)"

End If

Count = Count + 1

Cells(65533, 9) = Total

Wend

End Sub

Can someone please HELP.

Last edited: