Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run-Time error, type Mismatch


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


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566604

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Run-Time error, type Mismatch

Cells(y, i) = Right(Cells(y, a), Len(Cells(y, a)) - 1)

--
Regards,
Tom Ogilvy


"T De Villiers" wrote:


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


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566604


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run-time error 13: Type mismatch? Marko Enula Excel Discussion (Misc queries) 2 February 5th 08 01:00 PM
Run Time Error 13 Type Mismatch ExcelMonkey Excel Programming 3 October 12th 05 12:51 PM
Run-time error '13':Type mismatch Sibilia[_9_] Excel Programming 2 July 3rd 05 08:54 PM
run time error 13 type mismatch kkknie[_170_] Excel Programming 0 July 20th 04 03:28 PM
Run Time Error '13' Type mismatch David Adamson[_3_] Excel Programming 2 June 10th 04 04:00 AM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"