Muttaki
New Member
- Joined
- Mar 16, 2011
- Messages
- 6
Hi frends ,
Title may have been a little strange, but the code of an application already written with the help of my friends need a revision. Thank you in advance about the possibilities of this help. Let us come to our, the following code, if any value in column J of "0" ZERO in the "Empty warehouse" he writes in the value of the cell. But this time, this code connect to the "Volume Control" button in the functionality, in other words, I want to improve the quality. ALSO I need to add the column of control in column J in the control of the situation require that I use the connector for OR expression with another expression. At the same time in the column I want to use the IF statement. "I" column of the small number of digits in column J and J at the same cell, delete a small number "Stock Quantity Insufficient + Value" write
For Example ;
Orginal DATA===================================
Column I ColumnJ
Amount Deposit Amount
--------- --------------
7654 6895
1425 1425
3000 2950
23 0
=============================================
I want a result
Column I ColumnJ
Amount Deposit Amount
------ --------------
7654 Stock Quantity Insufficient 6895
1425 1425
3000 Stock Quantity Insufficient 2950
23 Empty warehouse
==============================================
Title may have been a little strange, but the code of an application already written with the help of my friends need a revision. Thank you in advance about the possibilities of this help. Let us come to our, the following code, if any value in column J of "0" ZERO in the "Empty warehouse" he writes in the value of the cell. But this time, this code connect to the "Volume Control" button in the functionality, in other words, I want to improve the quality. ALSO I need to add the column of control in column J in the control of the situation require that I use the connector for OR expression with another expression. At the same time in the column I want to use the IF statement. "I" column of the small number of digits in column J and J at the same cell, delete a small number "Stock Quantity Insufficient + Value" write
For Example ;
Orginal DATA===================================
Column I ColumnJ
Amount Deposit Amount
--------- --------------
7654 6895
1425 1425
3000 2950
23 0
=============================================
I want a result
Column I ColumnJ
Amount Deposit Amount
------ --------------
7654 Stock Quantity Insufficient 6895
1425 1425
3000 Stock Quantity Insufficient 2950
23 Empty warehouse
==============================================
Code:
Private Sub CommandButton4_Click()
Dim Say As Byte, bul As Range
Say = Range("J108").End(3).Row
Set kontrol = Range("J9:J" & Say).Find("ELDE STOK YOK --English ;Empty warehouse ", , , 1)
If Not kontrol Is Nothing Then
MsgBox "DAHA ÖNCE MİKTAR KONTROLÜ YAPILMIŞ --English ; Previously made little control. ", 64, "Uyarı Mesajı"
Exit Sub
End If
If WorksheetFunction.CountIf(Range("J9:J" & Say), 0) = 0 Then MsgBox "MİKTAR HATASI YOK,DEPODAKİ TÜM MİKTARLAR YETERLİ": Exit Sub
For Each bul In Range("J9:J" & Say)
If CStr(bul.Value) = CStr(0) Then
bul.Value = "Elde Stok Yok"
bul.Font.ColorIndex = 3
bul.Font.Bold = True
bul.Offset(0, -1).Font.ColorIndex = 2
bul.Offset(0, -1).Font.Bold = True
bul.Offset(0, -2).Font.ColorIndex = 2
bul.Offset(0, -2).Font.Bold = True
bul.Offset(0, -3).Font.ColorIndex = 2
bul.Offset(0, -3).Font.Bold = True
bul.Offset(0, -4).Font.ColorIndex = 2
bul.Offset(0, -4).Font.Bold = True
bul.Offset(0, 1).Font.ColorIndex = 2
bul.Offset(0, 2).Font.ColorIndex = 2
bul.Offset(0, 2).Font.Bold = True
bul.Offset(0, 3).Font.ColorIndex = 2
bul.Offset(0, 3).Font.Bold = True
bul.Offset(0, 4).Font.ColorIndex = 2
bul.Offset(0, 4).Font.Bold = True
bul.Offset(0, 4).Value = 0
bul.Offset(0, 5).Font.ColorIndex = 2
bul.Offset(0, 5).Font.Bold = True
bul.Offset(0, 5).Value = 0
bul.Offset(0, 6).Font.ColorIndex = 2
bul.Offset(0, 6).Font.Bold = True
bul.Offset(0, 6).Value = 0
bul.Offset(0, 7).Font.ColorIndex = 2
bul.Offset(0, 7).Font.Bold = True
bul.Offset(0, 7).Value = 0
bul.Offset(0, 8).Font.ColorIndex = 2
bul.Offset(0, 8).Font.Bold = True
bul.Offset(0, 8).Value = 0
bul.Offset(0, 9).Font.ColorIndex = 2
bul.Offset(0, 9).Font.Bold = True
bul.Offset(0, 9).Value = 0
Range(bul.Offset(0, -9).Address(False, False) & ":" & bul.Offset(0, 9).Address(False, False)).Interior.ColorIndex = 1
'Else
'MsgBox "MİKTAR HATASI YOK !"
End If
Next bul
End Sub[Code/]
Thank you, your trust in Allah.
Last edited: