+ Reply to Thread
Results 1 to 20 of 20

Formula to pick character based on name and date

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Lightbulb Formula to pick character based on name and date

    Dear all,

    i have attached table for staff attendance.

    could anyone help me to provide a formula as per my requirement in sheet attached.

    all yellow highlighted is my requirement.. thanks

    thanks in advance.
    Attached Files Attached Files
    Last edited by tariqnaz2005; 12-25-2023 at 07:04 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to pick character based on name and date

    Which version of Excel are you using?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: Formula to pick character based on name and date

    dear AliGW thanks for response..

    it is

    Microsoft® Excel® 2019 MSO (Version 2311 Build 16.0.17029.20028) 64-bit

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to pick character based on name and date

    Please update your forum profile to Excel 2019. Do this NOW, please.

  5. #5
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: Formula to pick character based on name and date

    dear madam,

    i have updated my profile to office 2019.. thanks for guidline.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to pick character based on name and date

    Thanks.

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Formula to pick character based on name and date

    =SUMPRODUCT(($A$3:$A$6=$J3)*($B$3:$H$6=R$2))
    Try this formula
    Last edited by AliGW; 12-16-2023 at 11:45 AM. Reason: HTML tags corrected.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to pick character based on name and date

    That doesn't address the whole problem. It only works for the last three columns - the OP needs everything in the yellow section.

  9. #9
    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,461

    Re: Formula to pick character based on name and date

    K3 copied down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Might need to be Array Entered.
    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


  10. #10
    Registered User
    Join Date
    04-13-2022
    Location
    Kristianstad, Sweden
    MS-Off Ver
    2007/2016
    Posts
    21

    Re: Formula to pick character based on name and date

    I changed TMS formula a little
    In K3 put formula =INDEX(B$3:B$6,MATCH($J3,$A$3:$A$6,0))&""
    Drag the formula down to K5
    Drag the formulas right to column Q
    In R3 put formula =COUNTIF(K3:Q3,R$2)
    Drag formula right and down

    Correct the formula in R3 to =COUNTIF($K3:$Q3,R$2) in attached file

    /LGS
    Attached Files Attached Files
    Last edited by LARS GULYAS; 12-17-2023 at 08:34 PM. Reason: Correct formula

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to pick character based on name and date

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  12. #12
    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,461

    Re: Formula to pick character based on name and date

    @LARS GULYAS:

    Not entirely sure why you would do this:
    I changed TMS formula a little
    In K3 put formula =INDEX(B$3:B$6,MATCH($J3,$A$3:$A$6,0))&""
    Drag the formula down to K5
    Drag the formulas right to column Q
    This:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    should be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    04-13-2022
    Location
    Kristianstad, Sweden
    MS-Off Ver
    2007/2016
    Posts
    21

    Re: Formula to pick character based on name and date

    TMS
    Thanks, I missed that $-sign in column R
    It was OK in column S, T

    /LGS

  14. #14
    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,461

    Re: Formula to pick character based on name and date

    @LGS:
    It was OK in column S, T
    Not if you put that formula in cell R3 and drag it across and down . . .

  15. #15
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: Formula to pick character based on name and date

    DEAR AliGW AND TMS AND LARS GULYAS & popipipo ,

    Thanks all of you 4 guys for your efforts for my questions. sorry i was away from office because of death of our King of Kuwait on Saturday.

    the formula given by LARS GULYAS and modified by TMS for R2:T5 Formula exactly what i was looking for.. thanks it work perfectly.

    However, i wish if i change any of 2 ranges .. i.e. date range K:2 to Q2 and if I change name range A3:A5, i should get the same data from the range A2:H6.. is it possible?

    thanks in advance
    Last edited by tariqnaz2005; 12-19-2023 at 05:40 AM.

  16. #16
    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,461

    Re: Formula to pick character based on name and date

    You're welcome.

    Please upload a new file with the change in layout/requirements.

  17. #17
    Registered User
    Join Date
    04-13-2022
    Location
    Kristianstad, Sweden
    MS-Off Ver
    2007/2016
    Posts
    21

    Re: Formula to pick character based on name and date

    tariqnaz2005

    Put this Formula in K3
    =VLOOKUP($J3,$A$2:$H$6,MATCH(K$2,$A$2:$H$2,0),0)&""
    Drag down to K5 and right to Q5.
    Erace J11
    I often use this formula in tables to sort in the right order,
    e.g. football, ice-hockey, handboll tables to see the current standing

    Name and Date can be arranged as you like (any way)

    Hope it takes care of your question

    /LGS
    Attached Files Attached Files
    Last edited by LARS GULYAS; 12-19-2023 at 04:58 PM. Reason: ed formula

  18. #18
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: Formula to pick character based on name and date

    LARS GULYAS.. thanks. it works fine.. thanks u guts for always support..

    thanks to ALIGW

  19. #19
    Registered User
    Join Date
    12-23-2023
    Location
    India
    MS-Off Ver
    2311
    Posts
    2

    Re: Formula to pick character based on name and date

    Hey guys can we not use a simple countif forumla for the same :

    =IF(COUNTIFS($B10:$H10,J$9)=0,"",COUNTIFS($B10:$H10,J$9))

    Here B10:H10 is the sample range with column J having the Absent , sick and leave options

  20. #20
    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,461

    Re: Formula to pick character based on name and date

    @tariqnaz2005: You're welcome. Thanks for the rep.

+ 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] Formula to get a character based on date and name together
    By tariqnaz2005 in forum Excel General
    Replies: 7
    Last Post: 12-16-2023, 10:11 AM
  2. Formula to pick a value based on date range
    By excel897 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-04-2023, 11:00 AM
  3. [SOLVED] pick date based on multiple criteria
    By amirflax in forum Excel General
    Replies: 12
    Last Post: 01-17-2021, 10:06 AM
  4. Pick every 6 before - Character
    By Noman050 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-03-2020, 01:08 AM
  5. Sumif date won't pick up based on time
    By ps2cho in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-17-2020, 08:26 AM
  6. Replies: 3
    Last Post: 12-15-2019, 01:11 PM
  7. Pick A Value Based on Relation Between Same Date Every Year
    By shadedrivein in forum Excel General
    Replies: 4
    Last Post: 07-01-2010, 10:22 AM

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