I am trying to understand the limits of the Range Method. I was just using
that as an example. When I put formulas in every second row from C1:C100 and
run the code in EXAMPLE 1 below, I get the following print out in my
Immediate Window:
$C$2,$C$4,$C$6,$C$8,$C$10,$C$12,$C$14,$C$16,$C$18,$C$20,$C$22,$C$24,$C$26,$C$28,$C$30,$C$32,$C$34,$C$36,$C$38,$C$40,$C$42,$C$44,$C$46,$C$48,$C$50,$C$52,$C$54,$C$56,$C$58,$C$60,$C$62,$C$64,$C$66,$C$68,$C$70,$C$72,$C$74,$C$76,$C$78,$C$80,$C$82,$C$84,$C$86
-----------------------------
253
As you can see the not all the cells are picked up. I am assuming that this
is because the Range method has a 255 character limit and the commas are
included in the string.
I want to dig into a way to get around this char limit in the range method.
Do you know of any workarounds?
EXAMPLE 1
Sub Thing()
Dim a As Range
Dim x As String
Set a = Worksheets("Sheet1").UsedRange.SpecialCells(xlFormulas)
x = a.Address
Debug.Print x
Debug.Print "-----------------------------"
Debug.Print Len(x)
End Sub
Thanks
EM