Thread: Compile error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Patrick Dave Patrick is offline
external usenet poster
 
Posts: 249
Default Compile error

Remove "End If" in both places.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Ed" wrote:
| When I run the following macro:
|
| --------------------------------------------------------------------------
|
| For r = 2 To 50
| For c = 4 To 50
|
|
|
| If Cells(r, 4) = "" Then Cells(r, 2) = 0
| End If
|
| If Cells(r, c) 0 And Cells(r, c + 1) = "" Then Cells(r, 2) = c - 3
|
| End If
| Next
| Next
|
| ------------------------------------------------------------------
|
| I get the following message:
|
| ------------------------------------------------------------------------
|
| Compile error
|
| End if without block if
|
|
| OK Help
| -----------------------------------------------------
|
| How do I correct the macro?
|
| Would appreciate any help
|
|
| EJE