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
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]OP[/TD]
[TD="class: xl65, width: 64"]PO[/TD]
[TD="class: xl65, width: 64"]PO1[/TD]
[TD="class: xl65, width: 64"]Final[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]OP[/TD]
[TD="class: xl65, width: 64"]PO[/TD]
[TD="class: xl65, width: 64"]PO1[/TD]
[TD="class: xl65, width: 64"]Final[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
</tbody>[/TABLE]
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