ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Time Error 424 (https://www.excelbanter.com/excel-programming/414716-run-time-error-424-a.html)

jfcby

Run Time Error 424
 
Hello,

I'm getting a run time error 424: object required in this part of my
script:

If cell.Text = "001" Or Trim(Left(cell, 4).Offset(, 2).Text) = "BLDG"

How can it be modified so that it does not give the error.

Thank yo for your help,
jfcby

Dave Peterson

Run Time Error 424
 
Maybe...

If cell.Text = "001" _
Or Trim(Left(cell.Offset(, 2).Text, 4)) = "BLDG" Then

jfcby wrote:

Hello,

I'm getting a run time error 424: object required in this part of my
script:

If cell.Text = "001" Or Trim(Left(cell, 4).Offset(, 2).Text) = "BLDG"

How can it be modified so that it does not give the error.

Thank yo for your help,
jfcby


--

Dave Peterson

jfcby

Run Time Error 424
 
On Jul 28, 10:32*am, Dave Peterson wrote:
Maybe...

If cell.Text = "001" _
*Or Trim(Left(cell.Offset(, 2).Text, 4)) = "BLDG" Then

jfcby wrote:

Hello,


I'm getting a run time error 424: object required in this part of my
script:


If cell.Text = "001" Or Trim(Left(cell, 4).Offset(, 2).Text) = "BLDG"


How can it be modified so that it does not give the error.


Thank yo for your help,
jfcby


--

Dave Peterson


Thanks Dave, works great
jfcby


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com