aayaanmayank
Board Regular
- Joined
- Jul 20, 2018
- Messages
- 157
Hi All,
Can anyone help me out on below code.
I have to update final rating in column D. following is the sequence if Column has rating then update in column d, else copy rating from column b & if column a & b does not have rating the copy rating from column c
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>
Can anyone help me out on below code.
I have to update final rating in column D. following is the sequence if Column has rating then update in column d, else copy rating from column b & if column a & b does not have rating the copy rating from column c
OP | PO | PO1 | Final |
A | A | A | A |
A | A | A | |
A | A | A | |
A | A | A | |
A | A | ||
A | B | A | |
A | A | A | A |
A | A | A | |
A | A | A |
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>
Code:
Sub mi()
Set FL = ThisWorkbook.Worksheets("Export Worksheet")
LASTROW = FL.Range("A" & Rows.Count).End(xlUp).Row
For U = 2 To LASTROW
If Cells(U, "c").Value = True Then
Cells(U, "C").Copy
Cells(U, "F").PasteSpecial
ElseIf Cells(U, "D").Value = True Then
Cells(U, "D").Copy
Cells(U, "F").PasteSpecial
End If
Next
End Sub