While many expect that this will “copy” the picture from p1 and create a new one for P2 thats not what happens at all.
But there are a few that might catch you unaware. And the difference between value types and reference types causes no end of confusion with code like this: dim p1, p2 as Picture Most reference types in Xojo are reasonably easy to identify – you have to use New to create one from scratch. the second line will allocate enough memory to hold the picture somewhere else in memory and then put the correct address of this block of memory into the memory address set aside in step 1.set aside a memory location, in the dim line, to hold a pointer (reference).They have a pointer to some other memory area that actually holds the data. Reference types do not store the data in the memory address assigned to the variable. Note: This is not the same as “ ByRef” in a method parameter declaration although it’s related. the second line will put the correct binary representation of “32” into the memory address set aside in step 1Īnd then there are reference types.set aside a memory location, in the dim line, to hold an integer.In Xojo this includes Integers of all kinds, Doubles or Colors. When you put a value into one, the memory address for this variable is set to whatever the correct binary representation for the value is. Let’s write the formula for counting the Customer Name in our example Excel workbook Range: The range of cells you want to countĬriteria: The criteria that control which cells should be counted.When I ask “What kind of variable are you?” I don’t mean “Are you an Integer, a String, a Variant, an Object?”. I am asking “are you a value type or a reference type?”. What’s the difference between the two? Within the COUNTIF function, we inserted all the values of Customer Name as range. So as criteria we have inserted a name (first name in this case, gradually will check using every other name) Our criteria were every name, since we need to calculate the number of instances for every name. It gave the number of occurrences for the name Max.Īs our data set is not a big one, you can have a quick look and find there are 4 ‘Max’ inside that Customer Name column.įor the rest of the values, you can use Excel AutoFill. We didn’t use Absolute Reference, so our cell references kept changing and gave wrong output. So, we need to use Absolute Reference before exercising AutoFill. This time it provided the correct values.īut think a little bit, whether this is in a format to fetch value in at the very first glance? No, this is neither providing the insides fast nor an eye pleasant form.
To make our result from where we can derive the insides faster, we can take help from Excel Sort & Filter feature. Select your desired column and explore the Data tab. There you will see the Advanced icon.Ĭlicking on the Advanced icon will lead you to the Advanced Filter dialog box. Select Copy to another location and insert the cell where you want to copy. Make sure to check Unique records only and hit Enter or click OK.