+ Reply to Thread
Results 1 to 5 of 5

Thread: ALMOST SOLVED Vlookup, offset, match & countif

  1. #1
    Registered User
    Join Date
    10-30-2003
    Location
    Dunstable, England
    MS-Off Ver
    2010
    Posts
    69

    ALMOST SOLVED Vlookup, offset, match & countif

    Hi

    I have a workbook (attached)

    The "result" sheet is the Student Sheet in the workbook


    =IFERROR(VLOOKUP(O$13,OFFSET(Membership_No,MATCH(MembNo,Membership_No,0),4,COUNTIF(Membership_No,Mem bership_No),6),6,0),"Null")

    is the formula used in the cells for the results - this is from the worksheet Records.


    All names are completely false so there is no Data Proctection issues.

    As a test, the Student is Robert Nutbush and has an entry for all the codes and a date of training as 16 March and the trainer is again Robert Nutbush. As you can see from the Student Sheet only half of the information is returning a result, the rest is coming back NULL and the trainer is not always Robert Nutbush.

    I have created this workbook following Mr Excel and Excelisin Trick 42 for the pictures in the Student Sheet which works fine, and Excel Magic Trick #158 Vlookup w 2 Variables as criteria on the Youtube channel. I have used VLOOKUP several times before, by this is my first time using OFFSET, MATCH & COUNTIF.
    Thank you in advance.


    I would appreciate some help or advice to correct this issue
    Attached Files Attached Files
    Last edited by jujuwillis; 08-24-2011 at 04:21 PM. Reason: another query/problem
    Julie Willis
    ---------------------------------------------------------
    Each day brings a little more learning

  2. #2
    Forum Guru Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    MS Excel 2010
    Posts
    2,246

    Re: Vlookup, offset, match & countif

    Instead of using

    COUNTIF(Membership_No,MembershipNo)

    in your formulae, try

    COUNTIF(Membership_No,MembNo)

  3. #3
    Registered User
    Join Date
    10-30-2003
    Location
    Dunstable, England
    MS-Off Ver
    2010
    Posts
    69

    Re: Vlookup, offset, match & countif

    Thank you for your help so quickly, I did have an issue with just a couple of cells, but that was due to a zero instead of an O and two members having the same membership number.

    Thanks again

    Julie





    Quote Originally Posted by Bob Phillips View Post
    Instead of using

    COUNTIF(Membership_No,MembershipNo)

    in your formulae, try

    COUNTIF(Membership_No,MembNo)
    Julie Willis
    ---------------------------------------------------------
    Each day brings a little more learning

  4. #4
    Registered User
    Join Date
    10-30-2003
    Location
    Dunstable, England
    MS-Off Ver
    2010
    Posts
    69

    Re: ALMOST SOLVED!! Vlookup, offset, match & countif

    Attached is a updated Student Record & Database.xlsx document.

    Previous thread Re: SOLVED Vlookup, offset, match & countif

    I have a still have a slight problem, I think I know what the problem is, but I don't know to fix it, I know that it will be a der moment but reconciling the records to the sheet has left me a bit brain dead.

    Short Explaination
    The Student Sheet has a data validation list next to Member's Name, this populates the membership no and changes the picture.

    This also populates all the rows from the Records sheet = to the member using the formula this is

    =IFERROR(VLOOKUP(G$146,OFFSET(Membership_No,MATCH(MembNo,Membership_No,0),4,COUNTIF(Membership_No,Me mbNo),6),6,0),"Null")

    Bob Phillips came to my rescue with this issue

    This works fine. The problem I have is:

    When selecting the member the records return the first record from the row above, which is a different member and omits the last record. The Record sheet is sorted by Membership Name. I have tried to sort by membership no in the record sheet but still get the same result.


    i.e Student Sheet is showing Barry Gibson, but the code AO1 is returning the result from Bob Ajob.

    Help and inspiration would be very much appreciated.
    Attached Files Attached Files
    Last edited by jujuwillis; 08-24-2011 at 03:45 PM.
    Julie Willis
    ---------------------------------------------------------
    Each day brings a little more learning

  5. #5
    Registered User
    Join Date
    10-30-2003
    Location
    Dunstable, England
    MS-Off Ver
    2010
    Posts
    69

    Re: ALMOST SOLVED Vlookup, offset, match & countif

    Attached is a updated Student Record & Database.xlsx document.

    Previous thread Re: SOLVED Vlookup, offset, match & countif

    I have a still have a slight problem, I think I know what the problem is, but I don't know to fix it, I know that it will be a der moment but reconciling the records to the sheet has left me a bit brain dead.

    Short Explaination
    The Student Sheet has a data validation list next to Member's Name, this populates the membership no and changes the picture.

    This also populates all the rows from the Records sheet = to the member using the formula this is

    =IFERROR(VLOOKUP(G$146,OFFSET(Membership_No,MATCH(MembNo,Membership_No,0),4,COUNTIF(Membership_No,Me mbNo),6),6,0),"Null")

    Bob Phillips came to my rescue with this issue

    This works fine. The problem I have is:

    When selecting the member the records return the first record from the row above, which is a different member and omits the last record. The Record sheet is sorted by Membership Name. I have tried to sort by membership no in the record sheet but still get the same result.


    i.e Student Sheet is showing Barry Gibson, but the code AO1 is returning the result from Bob Ajob.

    Help and inspiration would be very much appreciated.


    Thanks

    Ju
    Attached Files Attached Files
    Julie Willis
    ---------------------------------------------------------
    Each day brings a little more learning

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0