EDIT: Pardon petel45. I tried to edit thread title, but there seems to be some sort of glitch and changes are not getting saved.
Hm, I believe I managed to alter other macro I had. The code looks awful, but it works in the frst case and I'm trying to get the second case working as well.
Sub CurrentStatus()
Dim i, LastRow
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
If Cells(i, "A").Value <> "" Then
If Cells(i, "a").Row = 1 Then
Cells(i, "I") = Cells(1, "E") - Cells(1, "H")
Else
Cells(i, "I") = Cells(i, "E") - Cells(1, "H")
End If
End If
Next
End Sub
I belive I could throw away .Row = 1 line, but I didn't want to mendle too much.
I need a similar thing for column "J", which I intend to do this way:
[code]
Hm, I believe I managed to alter other macro I had. The code looks awful, but it works in the frst case and I'm trying to get the second case working as well.
I belive I could throw away .Row = 1 line, but I didn't want to mendle too much.
I need a similar thing for column "J", what I intend to do is something like:
Sub PreSumTable()
Dim i, LastRow
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
If Cells(i, "A").Value <> "" Then
If Cells(i, "a").Row = 1 Then
Cells(i, "J") = Cells(1, "D")*(1-0,1)^Cells(1, "F")
Else
Cells(i, "J") = Cells(i, "D")*(1-0,1)^Cells(i, "F")
End If
End If
Next
End Sub
Accordingly I believe this macro should work if I throw away
If Cells(i, "a").Row = 1 Then
Cells(i, "J") = Cells(1, "D")*(1-0,1)^Cells(1, "F")
And
Bookmarks