Well, I don't see any big issue in the code.

Try putting j instead of (6+i) and remove the word "format" before End Sub.

regards,
Mrinal

On Mon, Apr 11, 2011 at 7:50 AM, Financeguy <velocity...@gmail.com> wrote:

> Hi All,
>
> I've got some code that's a bit buggy for a stock analysis
> spreadsheet, and in need of some help.  For some reason, I experience
> an error at "    If Cells(6 + i, 12) <> "" Then" and would appreciate
> any help in fixing it.  Many thanks for your help in advance.
>
> Best, V
>
> _____
>
> Sub List()
>
> Dim i As Integer, j As Integer, n As Integer
>
> n = Range("K1")
> j = 7
>
> Range("N7:O1200").Select
> Selection.ClearContents
>
>
> For i = 1 To n
>    If Cells(6 + i, 12) <> "" Then
>        Cells(j, 14) = Cells(6 + i, 12)
>        Cells(j, 15) = Cells(6 + i, 1)
>        j = j + 1
>    End If
>
> Next i
>
> format
>
> End Sub
>
> _____
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to