#### jawaharprm

##### New Member

- Joined
- Dec 3, 2016

- Messages
- 4

Assigined button in sheet 1 and code to process in sheet2 but macro is not running please help.

Sub Button2_Click()

Dim i As Integer

i = 2

Do While Sheet2.Cells(i, 2) <> ""

Cells(i, 38) = Cells(i, 36) - Cells(i, 37)

i = i + 1

Loop

For i = 1 To 10000

If (Cells(i, 39) = "") Then

Exit For

Else

If ((Cells(i, 39) = "706")) Then Cells(i, 39) = "6"

If ((Cells(i, 39) = "703")) Then Cells(i, 39) = "3"

If ((Cells(i, 39) = "702")) Then Cells(i, 39) = "2"

If ((Cells(i, 39) = "704")) Then Cells(i, 39) = "4"

If ((Cells(i, 39) = "713")) Then Cells(i, 39) = "13"

If ((Cells(i, 40) = "")) Then Cells(i, 40) = 0

End If

Next i

End Sub