Yes, can I set value in range by rows, not columns. In other words, is there a way to fill values, like in a second version of code but without using a loop?
We ran some tests and, unfortunately, your scenario cannot be achieved without looping.
Based on this request we have created the enhancement suggestion to add possibility to change the direction of filling with SetValue parameter number 61056 into our internal tracker.
If you have any examples of VBA macros that is capable of performing such actions that you can share with us please feel free to share them so we can take notes for the suggestion.
Hello, I’m joining this thread about SetValue to multiCells range.
My purpose is to set “array formula” values using SetValues.
It is easy to do using the editor (Ctrl+Shift+Enter)
but I have no ideas how to do that from a macro.
I think it is a purpose very closed to th current subject
Kind regards
Please provide more details about the usage scenario of macro that you want to use.
For now, it doesn’t seem to be related to the topic of this thread.
No, I’m sorry @Constantine but you didn’t catch what i Means.
You demonstrate me how to assign a single cell with a formula working over an array of cells. OK
But My purpose is how to assign a multiple cells array with a single formula which return an array of values.
In an interactive way it is possible : Select Few cells, input the formula the press Ctrl+Shift+Enter.
And so the formula is assigned to the multi cell range and each cell formula field stay null.
the array formula appears inside curve braces.
four instance “{=A1:A10}”
When using SetValue for a formula to a multicell range, the formula is duplicated to each cell of the range. That is wrong.
kind regards
Thank you for the information, now I see your point.
Unfortunately, we do not have alternative method for this operation. We will take a closer look at it and I will provide feedback when any news come up on that.