Consulting

Results 1 to 9 of 9

Thread: Assistance with Formula please (VLOOKUP/IF)

  1. #1
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location

    Assistance with Formula please (VLOOKUP/IF)

    Hello,

    I have a rather large worksheet of users, IDs, passwords, dealer numbers and dealer names. Not all of the user ids and passwords have been allocated. I have been given the missing ones as a seperate worksheet.

    Now, without going down 700+ additions I would like to come up with a formula that'll do the job for me. If it was a simple VLOOKUP I wouldn't have any problems however, as the users can be assigned to several dealership (and have different user ids and passwords) I can't use a straight forward VLOOKUP.

    So the formula should fill in the cell if the user name and also dealer code match.

    Can anyone assist me with this one please?

    Thanks,

    The example sheet i've uploaded is a very basic example.
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

  2. #2
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,192
    Location
    What cell?
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved

    Excel 365, Version 2403, Build 17425.20146

  3. #3
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location
    Quote Originally Posted by georgiboy
    What cell?
    What cell do you want to know?

    On the sheet i'm updaing (Sheet13) then the blank user ids are in column B, the blank passwords are column C. The username we match is Column A and the dealer number is column G.

    We are pulling the data thats missing to complete the blanks from the sheet Dealership Users. Name to match is column B, dealer number to match is column A. The data is then puleld from columns C & D.
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

  4. #4
    VBAX Regular
    Joined
    May 2006
    Location
    Ossett, West Yorkshire, England
    Posts
    11
    Location

    Question

    Hi, I feel as though I am missing some thing here, but I can only work with what is in front of you. I used a vlookup and filled in the missing entries no bother I'm puzzled! have alook at the attachment
    Regards Howard

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Obviously, adjust the ranges to suit

    =IF(ISNA(MATCH(1,('Dealership Users'!$A$2:$A$4=Sheet13!G2)*('Dealership Users'!$C$2:$C$4=Sheet13!B2),0)),"",
    INDEX('Dealership Users'!$D$2:$D$4,MATCH(1,('Dealership Users'!$A$2:$A$4=Sheet13!G2)*('Dealership Users'!$C$2:$C$4=Sheet13!B2),0)))

    Array formula, so Ctrl-Shift-Enter it.
    ____________________________________________
    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

  6. #6
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location
    Thanks for the replies.
    I do have another, small issue.... for some reason, when ever i enter a formula it enters the formula into the field rather than the result. I have to search and replace the '=' for the formula to work. I can't see any reason for this to happen. (As such i can't test your formula xld).

    I've posted the full workbook with various bits of sensitive data removed - As you can see it's a little bit more complex than the basic example.
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

  7. #7
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,192
    Location
    Have you got the formulae cells formatted as text?
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved

    Excel 365, Version 2403, Build 17425.20146

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    georgiboy is correct, I forgot to mention that I had to reformat the security id column from text to general to get the formula to work.
    ____________________________________________
    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

  9. #9
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location
    formatted as text.... d'oh!
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

Posting Permissions

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