- Katılım
- 20 Mart 2009
- Mesajlar
- 333
- Excel Vers. ve Dili
- office 2003 ingilizce
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo hata
Select Case Target.Column
Case 5
If Target = "B" Then Target.Offset(0, -1) = Target.Offset(0, -1) * (-1)
Case 7
If Target = "A" Then Target.Offset(0, -1) = Target.Offset(0, -1) * (-1)
End Select
hata:
End Sub
bunu nereye yazacağım
Sub Eksi()
Dim i As Long
Application.ScreenUpdating = False
For i = 2 To Cells(Rows.Count, "A").End(3).Row
If Cells(i, "E") = "B" Then Cells(i, "D") = Cells(i, "D") * -1
If Cells(i, "E") = "A" Then Cells(i, "F") = Cells(i, "F") * -1
Next i
Application.ScreenUpdating = True
MsgBox "İşlem Tamamdır...:"
End Sub
Necdet Hocam,
13 mesajdaki kodda - bakiye bulamaz ise "- bakiye yoktur" mesajını nasıl verdirebilirim? Yani şartları sağlıyorsa işlem tamam yok ise "- bakiye yoktur" mesajı verdirmek istiyorum
Sub Eksi()
Dim i As Long
Application.ScreenUpdating = False
For i = 2 To Cells(Rows.Count, "A").End(3).Row
If Cells(i, "E") = "B" Then
If Cells(i, "D") = 0 Then
[B][COLOR=red] Cells(i, "I")[/COLOR][/B] = " Bakiye Yok "
Else
Cells(i, "D") = Cells(i, "D") * -1
End If
End If
If Cells(i, "E") = "A" Then
If Cells(i, "F") = 0 Then
[COLOR=red][B]Cells(i, "J")[/B][/COLOR] = "Bakiyesi Yoktur"
Else
Cells(i, "F") = Cells(i, "F") * -1
End If
End If
Next i
Application.ScreenUpdating = True
MsgBox "İşlem Tamamdır...:"
End Sub