You named the Function "lc" the same as a Variable "lc" in the other Sub.

Tip: Use
[vba]Option Explicit[/vba] as the first line of code.

Tip2: When using Dim, note that you must define each type. e.g.
[vba]Dim lc, lr as long[/vba] This defines lc as a variant and lr as Long.

Tip3. Column numbers are Integers. Row numbers are Long.