+ Reply to Thread
Results 1 to 8 of 8

Count number of cells from one match to another match on a different sheet

  1. #1
    Registered User
    Join Date
    02-08-2017
    Location
    London
    MS-Off Ver
    2010 & 2013
    Posts
    4

    Count number of cells from one match to another match on a different sheet

    I'm having an issue trying to come up with a suitable formula for a task I need to complete. My Excel is relatively weak and the task is fairly complex!

    Below is an example of what I'm trying to accomplish

    \1

    I have 9 items on "sheet 2"
    I would like an "item number" on sheet two to Vlookup that number from sheet 1 I want it to tell me how many cells over it was until it reaches the last data entry in that row and tell me how many cells it was.

    If the item is the same as the last entry then return text "correct" and if it doesn't match then return how many behind and red.

    I'm guessing some kind of vlookup, and a count with conditionally formatting but no idea how you would find the last data entry and combine this all into one statement and then replicate it down should I want to add say another 500 items.
    Last edited by snowdude2004; 02-08-2017 at 04:35 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Count number of cells from one match to another match on a different sheet

    Hi, welcome to the forum

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Count number of cells from one match to another match on a different sheet

    deleted my duplicate post

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,465

    Re: Count number of cells from one match to another match on a different sheet

    Please upload a sample workbook, not a picture, to the forum. Bot everyone will access file sharing sites and a picture is pretty useless anyway.

    Sorry, I didn't break that very gently, did I ... ?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    02-08-2017
    Location
    London
    MS-Off Ver
    2010 & 2013
    Posts
    4

    Re: Count number of cells from one match to another match on a different sheet

    Apologies both!

    I was coming from a theoretical approach and didn't expect someone to modify it. Attached is the example workbook
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-08-2017
    Location
    London
    MS-Off Ver
    2010 & 2013
    Posts
    4

    Re: Count number of cells from one match to another match on a different sheet

    Is anyone able to assist?

  7. #7
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Count number of cells from one match to another match on a different sheet

    Hi,

    an idea, in H13


    Please Login or Register  to view this content.
    if you'd need "correct" instead of zero, you could easily adjust the formula using an IF or you could use a custom format like

    Please Login or Register  to view this content.
    Regards
    Attached Files Attached Files
    Last edited by canapone; 02-12-2017 at 01:23 PM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  8. #8
    Registered User
    Join Date
    02-08-2017
    Location
    London
    MS-Off Ver
    2010 & 2013
    Posts
    4

    Re: Count number of cells from one match to another match on a different sheet

    Quote Originally Posted by canapone View Post
    Hi,

    an idea, in H13


    Please Login or Register  to view this content.
    if you'd need "correct" instead of zero, you could easily adjust the formula using an IF or you could use a custom format like

    Please Login or Register  to view this content.
    Regards
    You sir are a star, thank you very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count the number of cases that match the criteria
    By billj in forum Excel General
    Replies: 9
    Last Post: 11-23-2016, 09:43 AM
  2. need to count a specific number of nonblank cells that match a certain critera
    By JCHRISTMAS1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-02-2015, 11:59 AM
  3. [SOLVED] How do you count the number of dates that match a criteria
    By john dalton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2014, 09:23 AM
  4. Replies: 1
    Last Post: 11-20-2014, 06:21 AM
  5. [SOLVED] Count Number of Cells > 0 While Using VLookup/Index-Match
    By glennchung in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-22-2014, 02:10 PM
  6. [SOLVED] Count number of cells in a column that do not match records in a seperate range
    By ports83 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-13-2013, 08:51 AM
  7. [SOLVED] Count the number of instances where multiple criteria match
    By kurt.l in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-10-2012, 12:12 PM

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.6.0 RC 1