T
T De Villiers
Cant see the problem at all, getting Run-Time error 13, Type mismatch
at asterixed line
Thanks
Sub printtariq()
Worksheets("Test").Select
'1) Number the columns
a = Cells.Find("WorkOrder").Column
b = Cells.Find("CostC").Column
c = Cells.Find("PaperSize").Column
d = Cells.Find("PaperWeight").Column
e = Cells.Find("NoBW").Column
f = Cells.Find("NoColour").Column
g = Cells.Find("printtype").Column
h = Cells.Find("x").Column
'2) Define last row and column
lastrow = Range("A65500").End(xlUp).Row
lastcol = Range("IV1").End(xlToLeft).Column
'3)
Cells(1, lastcol + 1) = "WoNo"
Cells(1, lastcol + 1).Font.Bold = True
i = Cells.Find("WoNo").Column
MsgBox i
MsgBox a
For y = 2 To 11
***Cells(y, i) = Right(Cells(y, a), Len(Cells(y, a) - 1))
Next
End Sub
at asterixed line
Thanks
Sub printtariq()
Worksheets("Test").Select
'1) Number the columns
a = Cells.Find("WorkOrder").Column
b = Cells.Find("CostC").Column
c = Cells.Find("PaperSize").Column
d = Cells.Find("PaperWeight").Column
e = Cells.Find("NoBW").Column
f = Cells.Find("NoColour").Column
g = Cells.Find("printtype").Column
h = Cells.Find("x").Column
'2) Define last row and column
lastrow = Range("A65500").End(xlUp).Row
lastcol = Range("IV1").End(xlToLeft).Column
'3)
Cells(1, lastcol + 1) = "WoNo"
Cells(1, lastcol + 1).Font.Bold = True
i = Cells.Find("WoNo").Column
MsgBox i
MsgBox a
For y = 2 To 11
***Cells(y, i) = Right(Cells(y, a), Len(Cells(y, a) - 1))
Next
End Sub