Hey guys, below is some code I wrote for a friend and everything is working except for one minor flaw. The value from Sheet1.Range("B4") that gets added to where the Find function determines doesn't do decimals. The purpose of this macro is to make data entry easier for my coworker. Is there a formatting issue when pasting or when copying the data? I have formatted the cells themselves and they accept decimals from a manual input so the problem must lie somewhere in the coding.
Thanks a lot!
Thanks a lot!
VBA Code:
Sub Sort_Function()
Dim Page As String
Page = Sheet1.Range("A4").Value
Dim Dono As Integer
Dono = Sheet1.Range("B4")
Dim Sun As String
Sun = Sheet1.Range("B1")
Sheets(Page).Select
ActiveSheet.Range("A1:B5").Find(What:=Sun).Offset(0, 1).Select
i = ActiveCell.Value
ActiveCell.Value = i + Dono
Sheet1.Range("B4").EntireRow.Delete
End Sub