Results 1 to 10 of 12

Thread: Excel VBA Interception and Implicit Intersection and VLookUp

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,385
    Rep Power
    10

    Excel VBA Interception and Implicit Intersection and single Breadth Arrays

    Excel VBA Interception and Implicit Intersection and single Breadth Arrays


    If the last post is understood, then what is often considered as Implicit Intersection can be explained as a by product of what Excel does in terms of my imaginary help matrix, when we consider a similar idea for the case of a reference of a particular form. It is the sort of "middle case":
    To refresh: In the last post we looked at the two "extreme cases" : That of
    _ a multiple 2 dimensional range, like = A1:G5, or
    _ a single cell reference, like =C1.

    We now consider the case of a single "breadth" range. By single "breadth", I am talking about a range like A1:C1 or A1:A2 etc.
    We considered already for the case of a 2 Dimension range that we could visualise a full range help matix
    A1 B1
    A2 B2
    We said that effectively a Shift was needed in "horizontal" and vertical directions before the effective "revealing" of the cell "snap shotted in time" could be done. The imaginary help matrix, I suggested, was empty elsewhere, so nothing was revealed by a simple = in a cell. We were imagining that the = "made visible" the help matrix at the same point as that of the cell when "seen" by a screen update for that cell.

    The idea for the single reference case was that the help matrix had the single value from the referenced cell in all its "cells".
    B2 B2 B2 B2
    B2 B2 B2 B2
    This made the intersect very fast.


    My guess is that the corresponding imaginary help matrix for a single "breadth" range such as =A1:A2 could look like somewhere between the two, like this:
    Help Row\Help Col
    A
    B
    C
    D
    1
    A1 A1 A1 A1
    2
    A2 A2 A2 A2
    3
    ( A1 is the value in cell A1, A2 is the value in cell A2 from the spreadsheet we "see". The above screenshot is my imaginary help matrix. Yellow is the position in the spreadsheet cell for a cell containing the reference, in this case =A1:A2)

    It may be obvious the situation here. The CS Entry will work just as in the case of the 2 dimensional Array case, and Excel will with the returned array, follow its normal multiple evaluation , ( but going just along or just down to select the values and place in a return array for output. ) So we effectively only have to Control a Shift in one direction
    Possibly at this stage, as an aside, stepping back and adding some clarity to what is going on with a simple example is helpful here:
    Any range reference in a cell ( we are just considering one here, =A1:A2 ) , will as a result of a CS Entry have an array returned mirroring in dimensions and size the range referred to, but having the values from that range in it. The complete formula will then be evaluated talking in turn the single values from the corresponding position on any array ( only one this case of the simple formula of a single reference, =A1:A2 ) , and the total results collected in a similar size and dimensioned array.
    For example, consider the array {1, 2 } and { 3, 4 } as those which are returned from two references in a formula in a cell of = B1:C1 * C2:D2
    Excel will return finally { 3, 8 }
    Graphically consider some values in the first 2 rows of a spreadsheet, then if I do a type 2 CSE entry of that formula in, say in the range A3:B3, this is the sort of results I will have in the spreadsheet:
    Values:
    Row\Col
    A
    B
    C
    D
    1
    1
    2
    2
    3
    4
    3
    3
    8
    Formulas:
    Row\Col
    A
    B
    3
    {=B1:C1*C2:D2}
    {=B1:C1*C2:D2}
    Excel can be thought as initially returning the arrays, {1, 2 } from B1:C1 and { 3, 4 } from C2:D2, as instructed by the CS Entry, and then finally it does these evaluations
    ______ 1x3 __ , __ 2x4 ( columns then next row, - in this case just 1 row )

    Coming back to the example in the original screenshot:
    If we do no CS Entry , the default process comes in which effectively imagineatary "reveals" the help matrix.
    It will not give us a value in every cell in the worksheet. But as can be seen in the first screen shot we will get in the yellow cell the value from cell A2. ( remember the formula under consideration in that yellow cell would be =A1:A2 written in the spreadsheet a t the corresponding position in the imaginary spreadsheet on out screen ).
    If the formula were CS Entered, the value would be A1 in that cell, ( or in any cell other than A1 or A2 anywhere in the spreadsheet).
    In a cell in row 1 we would get A1 with or without CSE.
    For any row other than row 1 and row 2 we would get an error without CSE






    Edit later ref: https://support.microsoft.com/en-us/...rs=en-us&ad=us
    Last edited by DocAElstein; 02-02-2021 at 04:40 PM. Reason: https://support.microsoft.com/en-us/office/implicit-intersection-operator-ce3be07b-0101-4450-a24e-c1c999be2b34?ui=en-us&rs=en
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Similar Threads

  1. Intersection of Overlapping Ranges:Space Operator
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 05-17-2013, 12:32 AM
  2. Vlookup Multiple Values By Adding Formula With Loop In VBA
    By Safal Shrestha in forum Excel Help
    Replies: 15
    Last Post: 04-22-2013, 04:49 PM
  3. Replies: 10
    Last Post: 11-27-2012, 08:27 PM
  4. Replies: 4
    Last Post: 08-14-2012, 03:17 AM
  5. Help with a Vlookup and SUMIF
    By Lucero in forum Excel Help
    Replies: 4
    Last Post: 07-24-2012, 05:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •