raghavanhr
New Member
- Joined
- Aug 29, 2018
- Messages
- 5
Dear Friend,
Please help me to run the macro for all cells of a particular column, with reference to the adjacent cell till it is not an empty cell.
eg. column I refers to the cell value to execute the Macro in column J.
If the cell value of I =0, J value should be as "Can issue" else "Material Return Pending"
I have written the macro as below
"Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("I2").Value = 0 Then
Range("J2").Value = "Can Issue"
Else
Range("J2").Value = "Maretial Retun Pending"
End If
End Sub
"
I don't know how to attach my excel sample file.
pasted below the values of my excel
<tbody>
</tbody>
Please help me to run the macro for all cells of a particular column, with reference to the adjacent cell till it is not an empty cell.
eg. column I refers to the cell value to execute the Macro in column J.
If the cell value of I =0, J value should be as "Can issue" else "Material Return Pending"
I have written the macro as below
"Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("I2").Value = 0 Then
Range("J2").Value = "Can Issue"
Else
Range("J2").Value = "Maretial Retun Pending"
End If
End Sub
"
I don't know how to attach my excel sample file.
pasted below the values of my excel
SR.NO | DATE | ID NO. | PART. ID | DESCRIPTION | UOM | ISSUE QTY | RETURN QTY | NEW ISSUE | Material Issuance Check | SHIFT | PROJECT | REMARKS |
1 | 02/02/2019 | 801 | 81000000499 | EAR PLUG | NOS | 1 | 1 | 0 | Can Issue | DAY | JF1801 | |
2 | 02/02/2019 | 1353 | 81000000499 | EAR PLUG | NOS | 1 | 1 | 0 | DAY | JF1801 | ||
3 | 02/02/2019 | 1684 | 82100000040 | WHITE MARKER | NOS | 1 | 0 | 1 | DAY | JF1801 | ||
4 | 02/02/2019 | 894 | 81000000219 | TWECO CONNECTOR 120MM MALE | NOS | 2 | 0 | 2 | DAY | JF1801 | ||
5 | 02/02/2019 | 894 | 81000000219 | TWECO CONNECTOR 120MM FEMALE | NOS | 2 | 0 | 2 | DAY | JF1801 | ||
6 | 02/02/2019 | 952 | 76020000007 | DOTTED GLOVES | PAIR | 1 | 1 | 0 | DAY | JF1801 | ||
7 | 02/02/2019 | 952 | 81000000499 | EAR PLUG | NOS | 1 | 1 | 0 | DAY | JF1801 | ||
8 | 02/02/2019 | 952 | 81000000529 | GRINDING DISC 7'' | NOS | 1 | 1 | 0 | DAY | JF1801 |
<tbody>
</tbody>