Consulting

Results 1 to 7 of 7

Thread: Solved: Getting data from other sheet with if statement and somprodukt

  1. #1
    VBAX Regular
    Joined
    Mar 2011
    Posts
    52
    Location

    Solved: Getting data from other sheet with if statement and somprodukt

    LS,

    I want to get data from a other sheet then the main sheet when there is a match between two variables (main sheet and sub sheet).

    Currently i have got this formula, but how to continue?

    =IF(SOMPRODUKT(--(VC!A1:A100=Voorblad!B2))=1;?????????;0)

    I want to get data from row of the VC! sheet column B when the result of the match is 1.

    e.g.

    When Voorblad!B2 matches VC!A35 then I want to get the data from VC!B35.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Whilst I would use COUNTIF not SUMPRODUCT, what is wrong with that formula?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Mar 2011
    Posts
    52
    Location
    The formula is not wrong, however, I don't know what to fill in at the question marks!

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So are you saying that you want to look up the cell that matches a particular value, and then get the cell next to it? If so, to the left or the right, offset how many columns?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Regular
    Joined
    Mar 2011
    Posts
    52
    Location
    That is correct!

    If my value in main sheet B2 matches a value in Column A (sub sheet) then I want the value of the cell next (or 3 cells to the right (or 2 cells to the right + 4 cells to the right)) to the match of B2 and row of Column A.

    BTW the offset differs everytime, because i going to use this formula in multiple cells...

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I suggest that you check out VLOOKUP (VERT.ZOEKEN) in Excel help, it does what you want.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Regular
    Joined
    Mar 2011
    Posts
    52
    Location
    I solved my challenge with Vlookup!

    Thanks

Posting Permissions

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