simplyeshu
New Member
- Joined
- Jun 25, 2011
- Messages
- 30
Hello Frens,
I am trying to copy the content of few cells into the empty cells which are suppressed because of the same value but i am getting type mismatch error.
Below code i am using...
Sub Test()
For i=2 to (ActiveSheet.UsedRange.Rows.Count)
If Trim ((Cells(i,2) + Cells (i,6)+ Cells (i,8) + Cells (i,12) + Cells (i,17)+ Cells (i,25) + Cells (i,27) + Cells (i,29) + Cells (i,31) + Cells (i,33) + Cells (i,35 ))) = 0 Then
Range(Cells (i,2), Cells (i,35)).Select
Selection.FillDown
Range(Cells(i,42), Cells(i,42)).Select
Selection.FillDown
End If
Next
End Sub
Can anyone help me here?
I am trying to copy the content of few cells into the empty cells which are suppressed because of the same value but i am getting type mismatch error.
Below code i am using...
Sub Test()
For i=2 to (ActiveSheet.UsedRange.Rows.Count)
If Trim ((Cells(i,2) + Cells (i,6)+ Cells (i,8) + Cells (i,12) + Cells (i,17)+ Cells (i,25) + Cells (i,27) + Cells (i,29) + Cells (i,31) + Cells (i,33) + Cells (i,35 ))) = 0 Then
Range(Cells (i,2), Cells (i,35)).Select
Selection.FillDown
Range(Cells(i,42), Cells(i,42)).Select
Selection.FillDown
End If
Next
End Sub
Can anyone help me here?