I'm attempting to enter monthly income, expense and balance by current month (or month entered in referenced cell "B1" on Sheet2.
I have more work to do after this part is solved, but it's the biggest hurdle right now.
I want to look in every cell in a range, and the cell with the same month and year as B1, I want to use the offset function to enter the income, expense and balance below that cell (month). Here's what I have
Sub NewDash()
'Enters Dashboard balance per Date in "B1"
Dim a As Integer
Dim b As Integer
a = Month(Sheet2.Cells(1, 2))
b = Year(Sheet8.Cells(1, 2))
For Each cell In Range("Spend[[Month]:[Dec-2022]]")
If Month(cell.Value) = "a" And Year(cell.Value) = "b" Then
Range("A1").Offset(0, 0).Range("A1").Value = Sheet2.Range("TotalIncome")
Range("A1").Offset(1, 0).Range("A1").Value = Sheet2.Range("TotalExpense")
Range("A1").Offset(2, 0).Range("A1").Value = Sheet2.Range("TotalBalance")
End If
Next cell
End Sub
Any assistance is greatly appreciated
Bookmarks