+ Reply to Thread
Results 1 to 8 of 8

Index Code Including COUNT

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 7 & 10
    Posts
    11

    Index Code Including COUNT

    I would like to write a simple code that will count the birdies a player makes and add it to a separate sheet. Attached is an abbreviated workbook used for an example. Sheet1 is an example of a scored round where the players are grouped non-alphabetical. Sheet2 is a listing of the players in alphabetical order that I would like to add the count of birdies from sheet1. Birdies are one less than par. I have used a conditional format to highlight the birdies to make it easier to understand what I am after.

    Not sure how to get the code written in sheet2.

    Thanks
    Attached Files Attached Files
    Last edited by Bobby1949; 03-01-2012 at 02:52 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need Code for Birdies

    Welcome to the forum,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Index Code Including COUNT

    see if this is what your are looking for:
    Attached Files Attached Files
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Index Code Including COUNT

    Hi,

    In B3 on Sheet2 copied across and down

    =IF(B$2>INDEX(Sheet1!B:B,MATCH($A3,Sheet1!$A:$A,FALSE),1),1,0)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    03-01-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 7 & 10
    Posts
    11

    Re: Index Code Including COUNT

    Quote Originally Posted by DGagnon View Post
    see if this is what your are looking for:
    DGaganon, the results will work fine for what I am looking for. One question. If the data in sheet1 is linked from another sheet, will your code still work the same?

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Index Code Including COUNT

    it should still work, yes

  7. #7
    Registered User
    Join Date
    03-01-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 7 & 10
    Posts
    11

    Re: Index Code Including COUNT

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    In B3 on Sheet2 copied across and down

    =IF(B$2>INDEX(Sheet1!B:B,MATCH($A3,Sheet1!$A:$A,FALSE),1),1,0)
    Richard, this is what I was looking for. Thanks

  8. #8
    Registered User
    Join Date
    03-01-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 7 & 10
    Posts
    11

    Re: Index Code Including COUNT

    Thank you both for your help and suggestions. I believe I can use either one for my program.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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