Evaluate Range type solutions,
Text strings in and out of spreadsheet and effect on Number held as text thing
Consequences to Evaluate Range type solutions, from conclusions from last post
These were the conclusions from the last few posts:
_1) If the thing we try to put in a cell via like Range("G45").Value = is a simple single value variable, there does not appear to be a way to put "44" in a cell which would result in getting that _ Number held as text thing _
_2) If the thing we try to put in a cell via like Range("G45").Value = is an element in an array, then the situation is slightly more varied. In order to get that Number held as text thing ,
_2)(i) the array type must be String. (It can even be an array of just one element as in the experiment example line 32)
, but _2)(ii) It must be applied as a an array – if you apply a single specific element from the array, then you will not get that Number held as text thing
So that is the case when we put in a cell or cells via like Range("G45").Value = , a variable or element of an array, or an array, and it seems that only an array of string type will work to get that Number held as text thing thing
We might be able to make a good guess on the conclusions, based on the following:
_ The evaluate range type solutions are of this general form
_____ Range(____) .Value = Evaluate(________)
_ The RHS of the equation replaces the array or array element or simple variable we were looking at in the last two posts.
_ Most usually our range evaluate solutions are involved in getting the RHS to return an array of values
_ In more general use, Evaluate(__) may return a large variety of different things, and so correspondingly it has been designed to return Variant. Theoretically in general we can have an array of string element types in a Variant, and we can show that this will give us a Number held as text thing , ( https://www.excelfox.com/forum/showt...ll=1#post11210
https://www.excelfox.com/forum/showt...age2#post11210 )
However we are playing around with spreadsheet ranges, and whether in a spreadsheet or in VBA, any thing, any wiring, that gets values from them is wired to have Variant type elements since values can be a few things like numbers empties, strings, etc. This last bit is a bit dodgy and I might have to think about that again.
But for now, let’s do some experiments and see what actually happens.
Test Range
What do we want to do?:- We want to see what happens when we work on ranges in Evaluate(" ") and then put the result back into the spreadsheet,
To get some cells exhibiting Number held as text thing , the Split function is convenient
https://i.postimg.cc/L4vDz4ZP/Split-...ring-thing.jpgCode:Sub EvalAndHeldAsStringTypeInSpreadsheet() Dim Ws12 As Worksheet: Set Ws12 = ThisWorkbook.Worksheets.Item("Sheet1 (2)") Let Ws12.Range("A50:D50").Value = Split("44 55 66 77")
Split Function convenient to put in Number held as string thing.JPG
In the next 3 post we will take a look at that range, when we work on those ranges in Evaluate(" ") and then put the result back into the spreadsheet
.
.
.
.
.
..
.
.
.
.
.
.
..
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
https://www.youtube.com/watch?v=ySENWFIkL7c
https://www.youtube.com/watch?v=ySENWFIkL7c&lc=UgyqIYcMnsUQxO5CVyx4AaABAg
https://www.youtube.com/watch?v=yVgLmj0aojI
https://www.youtube.com/watch?v=yVgLmj0aojI&lc=UgwWg8x2WxLSxxGsUP14AaABAg.9k3ShckGnhv9k89Lsaig oO
https://www.youtube.com/watch?v=yVgLmj0aojI&lc=UgxxxIaK1pY8nNvx6JF4AaABAg.9k-vfnj3ivI9k8B2r_uRa2
https://www.youtube.com/watch?v=yVgLmj0aojI&lc=UgxKFXBNd6Pwvcp4Bsd4AaABAg
https://www.youtube.com/watch?v=yVgLmj0aojI&lc=Ugw9X6QS09LuZdZpBHJ4AaABAg
https://www.youtube.com/watch?v=vXyMScSbhk4
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgynOSp1dleo-Z8L_QN4AaABAg.9jJLDC1Z6L-9k68CuL4aTY
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgwV5N_ulFXYMNbyQG54AaABAg.9itCkoVN4w79itOVYVvE wQ
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgyOh-eR43LvlIJLG5p4AaABAg.9isnKJoRfbL9itPC-4uckb
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugy1B1aQnHq2WbbucmR4AaABAg.9isY3Ezhx4j9itQLuif2 6T
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgxxajSt03TX1wxh3IJ4AaABAg.9irSL7x4Moh9itTRqL7d Qh
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgwJAAPbp8dhkW2X1Uh4AaABAg.9iraombnLDb9itV80HDp Xc
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgzIzQ6MQ5kTpuLbIuB4AaABAg.9is0FSoF2Wi9itWKEvGS Sq
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
Bookmarks