- Search ExcelTip.com
directly from Excel
- Get immediate access to the
"Tip of the Hour"
- View hundreds of Microsoft
Excel tips with a click of a button
- Absolutely
Free - Click
here to download
Make your Amazon.com purchases by clicking the graphic below
|
Excel Tip .com - Mailing List Thread Index
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remedy for Type Mismatch
Thankx Bill and Howard. Works great!!
Jim
In a message dated 7/24/2003 1:19:14 PM Eastern Daylight Time,
cmmroom@DDRE.DETROITDIESEL.COM writes:
> This should work.
>
> For nrow = Range("N500").End(xlUp).Row To 7 Step -1
> If IsNumeric(Cells(nrow, 14)) Then
> If Cells(nrow, 14) <= 0 Then
> Rows(nrow).Delete
> End If
> End If
> Next
>
>
>
>
>
> Howard Groves
> cmmroom@ddre.detroitdiesel.com
>
> >-----Original Message-----
> >From: Jim . [SMTP:Escojpoer@AOL.COM]
> >Sent: Thursday, July 24, 2003 1:03 PM
> >To: EXCEL-G@PEACH.EASE.LSOFT.COM
> >Subject: Remedy for Type Mismatch
> >
> >How can I avoid this mismatch I get when this section runs? The contents
> >of
> >each cell will either be a number value or #N/A, and the goal is to delete
> >the
> >entire row if the cell is <= 0, but keep the row if #N/A is in the cell.
> >#N/A
> >is a pasted value.
> >Of course I get a Type Mismatch when I run it.
> > Jim
> >
> >For nRow = Range("N500").End(xlUp).Row To 7 Step -1
> >
> > If Cells(nRow, 14) <= 0 And Cells(nRow, 14) <>"#N/A" Then
> > Rows(nRow).Delete
> >Next
> >
>
--------------------------------------------------------------------------
The EXCEL-G list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software. For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/excel-g.html .
COPYRIGHT INFO:
http://peach.ease.lsoft.com/scripts/wa.exe?SHOWTPL=COPYRIGHT&L=EXCEL-G
|
And at your local bookseller


Excel Training Level I
Excel
Training Level II
Excel
Training Level III
Excel
VBA Training Level I
Excel
VBA Training Level II
View All Excel Training Programs

Formula Manager
Duplication
Manager
Text
Manager
Number
Manager
Add-ins
Collection
Spreadsheet
Assistant
Number
Manager
Add-ins
Collection
Spreadsheet
Assistant
View All Excel Add-Ins
|