Hi,
I'm trying to use the SUM function with non sequenced cell but the Range or any other function won't allow me to activate the selecting cells if there are more then 41 cell, I wrote somthing like so:
But if the str input was a 41 or less Cells address string then it works
any help will be appreciated
Daniel
I'm trying to use the SUM function with non sequenced cell but the Range or any other function won't allow me to activate the selecting cells if there are more then 41 cell, I wrote somthing like so:
Code:
Sub Test()
Dim str AS String
Dim R AS Range
str = "A1,A3 ...... ,A57" 'this is only an example, assum that there are _
more then 41 cells
Set R = Range(str) 'Here is the Problem, I get a Runtime error 1004 _
Application-defined or object-defined error
R.select
End Sub
any help will be appreciated
Daniel
Last edited: