RPrinceton
Programmer
Hi Everyone,
I have an Excel spreadsheet. I want to conditionally use the 'PROPER' function against certain cells. The code snippet below results in an Excel error that indicates that there is circular reference. I do not know how this can be since I bump the value of r with each interation. How do I conditonally apply a formula to a specific cell?
Please advise. Thx in advance.
Regards,
RPrinceton
code snippet:
Do While r <> lastrow ' Loop until end of rows.
c = 1
r = r + 1
With Worksheets(1).Cells(r, c)
addr = .Address(RowAbsolute:=False) 'get addr in $A1 format
addr = Mid(addr, 2) ' trim $A1, $A2 to A1, A2 etc
if .value > "t"
.Formula = "=PROPER(" & addr & ")"
End With
Loop
I have an Excel spreadsheet. I want to conditionally use the 'PROPER' function against certain cells. The code snippet below results in an Excel error that indicates that there is circular reference. I do not know how this can be since I bump the value of r with each interation. How do I conditonally apply a formula to a specific cell?
Please advise. Thx in advance.
Regards,
RPrinceton
code snippet:
Do While r <> lastrow ' Loop until end of rows.
c = 1
r = r + 1
With Worksheets(1).Cells(r, c)
addr = .Address(RowAbsolute:=False) 'get addr in $A1 format
addr = Mid(addr, 2) ' trim $A1, $A2 to A1, A2 etc
if .value > "t"
.Formula = "=PROPER(" & addr & ")"
End With
Loop