john316swan
Board Regular
- Joined
- Oct 13, 2016
- Messages
- 66
- Office Version
- 2019
- Platform
- Windows
Is there a trick to get around the 255 R1C1 character limit? I am trying to convert a formula to an array but get a run-time error '13' type mismatch error. I then tried to use named ranges to breakup the formula into pieces which shortened the formula...it worked, but it took WAY too long.
Here is a snippet of what I am trying to do:
Am I going about this the wrong way? Any suggestions? Thank you for your help!
Here is a snippet of what I am trying to do:
Code:
Sub formulaLoad()
Dim id as Range
Dim lr as long
lr = [RTA]
Set id = Worksheets("Ready").Range("A2:A" & lr)
'There are more ranges
With id
.Formula = "=INDEX('M:\Financial Aid\ELECTRONIC FILES\SPS\[19-20 SPS Student Tracking.xlsm]Desiree'!C1,SMALL(IF('M:\Financial Aid\ELECTRONIC FILES\SPS\[19-20 SPS Student Tracking.xlsm]Desiree'!C18=""YES"",ROW('M:\Financial Aid\ELECTRONIC FILES\SPS\[19-20 SPS Student Tracking.xlsm]Desiree'!C18)-ROW(INDEX('M:\Financial Aid\ELECTRONIC FILES\SPS\[19-20 SPS Student Tracking.xlsm]Desiree'!C18,1,1))+1),ROW(R[-1]C)))"
.FormulaArray = .FormulaR1C1
End With
'There is more code but it works just fine
End Sub
Am I going about this the wrong way? Any suggestions? Thank you for your help!
Last edited: