LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data with starting with - causes Type Mismatch


I wrote a little program that I use to sort alot of data until a bug
finally caught up with me today.

Range("b1").Select 'selects cell b1
For i = 1 To intRowCount
If ActiveCell.Offset(0, 2) = Null Then
ActiveCell.Value = mapcell
End If

If InStr((ActiveCell.Offset(0, 2).Value), batchnumber) Then
ActiveCell.Value = mapcell
End If
Next I

Problem is the data put into one of the ActiveCell.Offset(0, 2) cells
happends to be "- test" so it displays as #NAME and crashes my macro.

Any sugestions would be helpfull


--
icdoo
------------------------------------------------------------------------
icdoo's Profile: http://www.excelforum.com/member.php...o&userid=27342
View this thread: http://www.excelforum.com/showthread...hreadid=497095

 
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
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Database Query -- Data Type Mismatch StephenP Excel Discussion (Misc queries) 0 April 14th 05 07:05 PM
Type Mismatch Error when getting data from another workbook Tony Zappal Excel Programming 2 January 12th 05 10:29 PM
Varient Int data type mismatch Kevin Excel Programming 0 August 12th 03 03:51 AM


All times are GMT +1. The time now is 03:51 AM.

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

About Us

"It's about Microsoft Excel"