I am trying to establish the length of a cell in vba
So if one would like to find the length of A1
then len(A1)
however in VBA dont think I can use worksheetfunction.len,
any ideas, many thks
I am trying to establish the length of a cell in vba
So if one would like to find the length of A1
then len(A1)
however in VBA dont think I can use worksheetfunction.len,
any ideas, many thks
Actually very easy, no probs, thks
Hi,
if you use
Len(Range("A1"))
This will give you the character length of the entry in that cell.
HTH
DS
"T De Villiers" wrote:
>
> I am trying to establish the length of a cell in vba
>
> So if one would like to find the length of A1
>
> then len(A1)
>
> however in VBA dont think I can use worksheetfunction.len,
>
> any ideas, many thks
>
>
> --
> T De Villiers
> ------------------------------------------------------------------------
> T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
> View this thread: http://www.excelforum.com/showthread...hreadid=563705
>
>
Hi T,
Use VBA's Len function:
Dim iLen as long
iLen = Len(Range("A1").Value)
---
Regards,
Norman
"T De Villiers" <[email protected]>
wrote in message
news:[email protected]...
>
> I am trying to establish the length of a cell in vba
>
> So if one would like to find the length of A1
>
> then len(A1)
>
> however in VBA dont think I can use worksheetfunction.len,
>
> any ideas, many thks
>
>
> --
> T De Villiers
> ------------------------------------------------------------------------
> T De Villiers's Profile:
> http://www.excelforum.com/member.php...o&userid=26479
> View this thread: http://www.excelforum.com/showthread...hreadid=563705
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks