+ Reply to Thread
Results 1 to 60 of 60

Need attendace sheet for saleman visited diffrent regions with different Items

  1. #1
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Need attendace sheet for saleman visited diffrent regions with different Items

    Hello Dear

    I find this forum very effective and swift reply solve my earlier problems.

    I am here with a new problem. Here is the data. Where different salesmen visited different regions with different items, but the supervisor don't know which region is unattended with which item.

    Salesman Items Region
    Salesman101 Item-1 REG-1
    Salesman101 Item-2 REG-3
    Salesman101 Item-3 REG-3
    Salesman101 Item-4 REG-6
    Salesman111 Item-1 REG-3
    Salesman111 Item-2 REG-1
    Salesman111 Item-3 REG-3
    Salesman111 Item-4 REG-3
    Salesman111 Item-5 REG-6
    Salesman111 Item-6 REG-3
    Salesman111 Item-7 REG-5

    I need following output where a tick is marked automatically when a salesman visited a region

    REG-1 REG-2 REG-3 REG-4 REG-5 REG-6 REG-7 REG-8 REG-9 REG-10 REG-11
    Salesman101 Item-1 P
    Salesman101 Item-2 P
    Salesman101 Item-3 P
    Salesman101 Item-4
    Salesman111 Item-1
    Salesman111 Item-2
    Salesman111 Item-3
    Salesman111 Item-4
    Salesman111 Item-5
    Salesman111 Item-6
    Salesman111 Item-7
    Attached Files Attached Files

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    In C20 copied across and down:

    =IF(FILTER($E$4:$E$14,($C$4:$C$14=$A20)*($D$4:$D$14=$B20))=C$19,"P","")
    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 Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,408

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    In C20

    Formula: copy to clipboard
    Please Login or Register  to view this content.


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

  4. #4
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Quote Originally Posted by AliGW View Post
    In C20 copied across and down:

    =IF(FILTER($E$4:$E$14,($C$4:$C$14=$A20)*($D$4:$D$14=$B20))=C$19,"P","")
    Thanks problems solve.
    Is possible instead of copied accross and down, copy in the first field and generate an Array with same tickmark....

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Not easily, and it takes under three seconds do the drag copy across and down - I'm not in the mood to spend an hour trying to work out how to save you two seconds, sorry!

  6. #6
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    OK, don't waste time and spend time for helping others; you are doing great job. It is a two second job for a sample book but it will slow down my a long worksheet when excel have to recalculate each cell. Any how, thanks for your solution
    Last edited by AliGW; 04-29-2024 at 07:04 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  7. #7
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Actually, I did have a go.

    =LET(r,DROP(REDUCE(0,A20:A30&B20:B30,LAMBDA(x,y,VSTACK(x,FILTER(E4:E14,C4:C14&D4:D14=y)))),1),DROP(REDUCE(0,C19:M19,LAMBDA(x,y,HSTACK(x,IF(y=r,"P","")))),,1))
    Attached Files Attached Files
    Last edited by AliGW; 04-29-2024 at 06:44 AM.

  8. #8
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Great Work !!! You are Genius
    Last edited by AliGW; 04-29-2024 at 07:04 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  9. #9
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Nah - I'm a nerd, though.

  10. #10
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Quote Originally Posted by AliGW View Post
    Nah - I'm a nerd, though.
    How ranges can be make dynamic Like A20:A30&B20:B30 (Number of salesman) and C19:M19 (Number of Regions)

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Still not enough, then?

    =LET(r,DROP(REDUCE(0,tocol(A20:A3000,1)&tocol(B20:B3000,1),LAMBDA(x,y,VSTACK(x,FILTER(E4:E14,C4:C14&D4:D14=y)))),1),DROP(REDUCE(0,C19:M19,LAMBDA(x,y,HSTACK(x,IF(y=r,"P","")))),,1))
    Last edited by AliGW; 04-29-2024 at 07:22 AM.

  12. #12
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    The ranges are static and i have to adjust if i add new region or new entry for salesmen
    Last edited by AliGW; 04-29-2024 at 07:25 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  13. #13
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    I don't understand the problem, sorry.

  14. #14
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Sorry i ignore your reply with ToCol() function. Now it is dynamic.....Thanks
    Last edited by AliGW; 04-29-2024 at 07:30 AM. Reason: Please STOP quoting unnecessarily!

  15. #15
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Just make the ranges longer than you'll ever need:

    =LET(r,DROP(REDUCE(0,TOCOL(G4:G10000,1)&TOCOL(H4:H10000,1),LAMBDA(x,y,VSTACK(x,FILTER(TOCOL(E4:E10000,1),TOCOL(C4:C10000,1)&TOCOL(D4:D10000,1)=y)))),1),DROP(REDUCE(0,TOROW(I3:ZZ3,1),LAMBDA(x,y,HSTACK(x,IF(y=r,"P","")))),,1))

    YOu have to do some of the work!
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Is it possible to sum/count "P" based on salesman and output might be like following

    REG-1 REG-2 REG-3 REG-4 REG-5 REG-6 REG-7 REG-8 REG-9
    Salesman101 1
    Salesman111 2
    Salesman112 2
    Salesman113 2
    Salesman114 2
    Salesman115 5
    Salesman116 2
    Salesman117
    Attached Files Attached Files
    Last edited by AliGW; 04-29-2024 at 11:56 PM. Reason: Please STOP quoting unnecessarily!

  17. #17
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    You are going to need to explain this (and tell me how you calculated the percentages):

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    K
    L
    M
    N
    O
    P
    Q
    19
    REG-1
    REG-2
    REG-3
    REG-4
    REG-5
    REG-6
    20
    Salesman101
    33%
    67%
    21
    Salesman111
    11%
    56%
    11%
    22%
    22
    Salesman121
    50%
    50%
    23
    24
    15%
    17%
    41%
    17%
    4%
    7%
    Sheet: Sheet1

    Where did salesman 121 come from???

    Administrative Note re. Forum Guideline #2:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter and rarely necessary.

    If you are responding out of sequence, it is usually enough just to mention the helper's user name (e.g @AliGW).

    If you do need to quote, limit the quoted section just to the section to which you wish to draw your helper's attention or a direct question to which you wish to respond.

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

  18. #18
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    @aliGW

    Calculation of percentages are mentioned in the sample Excel. If Salesman101 is dealing in three Items, then, for each region, the % is 1/3=33%. Salesman111 is dealing with 9 items, therefore, the region wise % is 1/9=11%. Region wise accumulated percentage is then calculated which is mention in your query. Salesman121 is an arbitrary entry to make the table more self-explanatory.
    Last edited by MubiJazz; 04-30-2024 at 12:16 AM.

  19. #19
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Adding a salesman that doesn't exist does NOT make anything more self-explanatory - it merely adds to the confusion!!!

    Are you on the BETA channel for Excel 365?

  20. #20
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    If you are on the BETA channel:

    =LET(v,VSTACK(B19:H19,GROUPBY(A20:A31,C20#,SUM)),IF(v=0,"",v))

  21. #21
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    OK, apologies for adding confusion...

    I have not joined Beta Channel for Excel 365. Restricted in the Office Admin

  22. #22
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Error

    #Name?

  23. #23
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    OK - if no GROUPBY, then try this:

    Please Login or Register  to view this content.
    In future, please remember that it is ONE issue per thread here, please. Thanks.

    Glad to have helped.

    If you have not already done so, remember that you can reward 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.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Thanks for your support and help. I tried to do so by the message is "You must spread some Reputation around before giving it to AliGW again."

    There is an error in the formula, as the calculation for region 3 is incorrect. For Salesman101, it should be 67% and for Salesman111 56% instead of 33% & 89% respectively.

  25. #25
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    @AliGW, Why doesn't the 11% from cell G31 end up in cell P28?
    Attached Images Attached Images

  26. #26
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Try this:

    Please Login or Register  to view this content.
    @AliGW, Why doesn't the 11% from cell G31 end up in cell P28?
    See the correction to the formula above - the BYCOL array had been set incorrectly.
    Attached Files Attached Files
    Last edited by AliGW; 04-30-2024 at 01:05 AM.

  27. #27
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Now it is. A good improvement. .

  28. #28
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Not an improvement - a correction. Brain fart - I was up too early! The dawn chorus always wakes me, and it's getting much earlier now ...

  29. #29
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Now it is working and thanks one again. How I add reputation with this message (You must spread some Reputation around before giving it to AliGW again.)

  30. #30
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    How I add reputation with this message (You must spread some Reputation around before giving it to AliGW again.)
    It tells you - until you have repped someone else, you won't be able to rep me again. Don't worry about it.

  31. #31
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    OK

    One last request. Can the output column heading be skipped or set salesman column heading as "Salesman". As in source range (A19:H31) when i set column headings of Column A & B as Salesman & Items, the output shows wrong headings.....

  32. #32
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    No idea what you are on about this time.

    Your expected output above and mine below - where are the headings incorrect???

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    K
    L
    M
    N
    O
    P
    Q
    19
    REG-1
    REG-2
    REG-3
    REG-4
    REG-5
    REG-6
    20
    Salesman101
    33%
    67%
    21
    Salesman111
    11%
    56%
    11%
    22%
    22
    23
    24
    15%
    0%
    41%
    0%
    4%
    7%
    25
    26
    REG-1 REG-2 REG-3 REG-4 REG-5 REG-6
    27
    Salesman101
    33%
    67%
    28
    Salesman111
    11%
    56%
    11%
    22%
    29
    15%
    41%
    4%
    7%
    Sheet: Sheet1

  33. #33
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Please see the attachment. When column headings are added. The output changes with which column
    Attached Files Attached Files

  34. #34
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Is this what you want?

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    K
    L
    M
    N
    O
    31
    REG-1 REG-3 REG-5 REG-6
    32
    Salesman101
    33%
    67%
    33
    Salesman111
    11%
    56%
    11%
    22%
    34
    15%
    41%
    4%
    7%
    Sheet: Sheet1

    If so, then this:

    Please Login or Register  to view this content.

  35. #35
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Attachment 867628 I want such heading

  36. #36
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    OK - I'm out, sorry. You have now shifted the goalposts in this thread THREE TIMES!

    In future, explain EXACTLY what you need IN FULL in your opening post.

  37. #37
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    The problem arises with the diversity of solution I received. I accepted that sum solution was not part of my original query but this problem is part and parcel of solution you suggested. I appreciate your efforts you put to fix my problems.

  38. #38
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    No - it's to do with you wanting to add extra columns.

    I have made a few changes.

    In A31:

    =TOCOL(C4:C28,1)

    In B31:

    =TOCOL(D4:D28,1)

    In C31:

    =LET(r,DROP(REDUCE(0,A31#&B31#,LAMBDA(x,y,VSTACK(x,FILTER(TOCOL(E4:E28,1),TOCOL(C4:C28,1)&TOCOL(D4:D28,1)=y)))),1),IFNA(DROP(REDUCE(0,TOROW(C30:Z30,1),LAMBDA(x,y,HSTACK(x,IF(y=r,1/COUNTIFS(A31#,A31#),"")))),,1),""))

    In N3:

    Please Login or Register  to view this content.
    I will look at generating the headers in row 30 automatically later.
    Attached Files Attached Files

  39. #39
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    In A30:

    =HSTACK("Salesmen","Items","REG-"&SEQUENCE(,MAX(IFNA(--TEXTAFTER(E4:E28,"-"),0))))

    Now it's fully automated.
    Attached Files Attached Files

  40. #40
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    And if you want only columns with values in the summary table:

    Please Login or Register  to view this content.
    You're welcome,
    Attached Files Attached Files

  41. #41
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Finally, the problem solved, thanks and I will let you know with new problems in new thread with precise problem statement.

  42. #42
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Think EVERYTHING through first. AND try to wiork it out yourself first based on what you've learnt so far.

  43. #43
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    I was curious to see if I could refine it further.

    Table 1 in A30:

    Please Login or Register  to view this content.
    Table 2a in N3:

    Please Login or Register  to view this content.
    Table 2b in Z3:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  44. #44
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,408

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    @Ali: in at the very deep end for me but can you clarify for me what x,y z are in the following:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    As I undertand it,(LAMBDA) x is a parameter, as y and z (?) but to what do they refer ?

    For example the "a" could be replaced C4:C28 (from the LET

    The videos I have watched on LAMBDA are much simpler to understand than the above
    Last edited by JohnTopley; 04-30-2024 at 06:19 AM.

  45. #45
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Yes, sure.

    =REDUCE("",c,LAMBDA(x,y,VSTACK(x,BYCOL(DROP(A30#,1,2),LAMBDA(z,SUMIF(a,y,z))))))

    REDUCE requires TWO parameters: an opener (usually "" or 0) plus in this case the range defined by c.

    LAMBDA(x,y,VSTACK(x,BYCOL(DROP(A30#,1,2),LAMBDA(z,SUMIF(a,y,z)))))

    LAMBDA then needs to give a name to these two paramters - I use x and y.

    Then you need to stack x on top of y:

    VSTACK(x,BYCOL(DROP(A30#,1,2),LAMBDA(z,SUMIF(a,y,z))))

    BUT you are going to manipulate y:

    BYCOL(DROP(A30#,1,2),LAMBDA(z,SUMIF(a,y,z)))

    In the nested LAMBDA, z refers to the range A30#.

    All of these sub-parameters in LAMBDAs take a bit of getting used to, but suddenly, one day, you've got it. Took me ages!

    Does this help?

    This construct is used where you might otherwise want to nest a BYCOL within a BYROW (or vice-versa), which is not possible.

    For example the "a" could be replaced C4:C28
    You are trying to make the formula as concise as possible bt defining parameters, especially if they are to be used multiple times.
    Last edited by AliGW; 04-30-2024 at 06:23 AM.

  46. #46
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    @AliGW Thanks, I login to ask the same issue but you fix it before my query.


    The "Data Missing" msg appears which is good when any one item/Region entry is missing but it should be like for only those salesmen where item(s) or Region are missing...Anyhow you make an excellent solution for my problems.
    Last edited by MubiJazz; 04-30-2024 at 07:17 AM.

  47. #47
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,408

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    @Ali: thank you for taking the time to explain the elements of the formula: it will take a while (if ever)! to get my head round these functions within functions!
    Last edited by JohnTopley; 04-30-2024 at 07:03 AM.

  48. #48
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    I thought that only a few weeks ago, and then suddenly, I seemed to get it.


    Thanks, I login to ask the same issue but you fix it before my query.
    I read your mind ...

    However, you should have been able to add the IFERROR trap yourself, really.

  49. #49
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Quote Originally Posted by MubiJazz View Post
    @AliGW

    The "Data Missing" msg appears which is good when any one item/Region entry is missing but it should be like for only those salesmen where item(s) or Region are missing...Anyhow you make an excellent solution for my problems.
    For this query, should i generate a new thread to get the answer. Your Mega Matrix is very comprehensive but when i implemented this on my data, the output is not generated until there there is no missing value under Item or region column. Item Column be never empty as I enter salesman name, item with serial number autofilled. So region has to be allocated and one can't find the empty values.

  50. #50
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    I have no idea what you mean, but all three columns HAVE to be completed for the formulae to work.

    the output is not generated until there there is no missing value under Item or region column.
    Correct - as I said, the formula needs all three columns complete. Why would I have expected values to be missing when that has never been shown in your sample data? Is this another bit of information you forgot to mention?

    So region has to be allocated and one can't find the empty values.


    SHOW me an example - it might be a quick tweak, it might not.

  51. #51
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    You could add data validation to the region field to force users to fill it in - is that what you mean?

  52. #52
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Quote Originally Posted by AliGW View Post


    Correct - as I said, the formula needs all three columns complete. Why would I have expected values to be missing when that has never been shown in your sample data? Is this another bit of information you forgot to mention?
    Yes, I came to be aware of missing value for column REGION when I implemented the solution in my Excel Sheet when I missed the allocation of Regions. First two columns be never incomplete, but Region column can be filled later.


    Input by users might fill regions later, but the output sheet seen by supervisor will get blank or Missing Data information. Data validation will force them to fill the correct data, but not forced them fill regions immediately. In this way, those salesmen who completed the input sheet may also consider incompetent, whereas incompetent are those who have not identified their sales region.
    Attached Files Attached Files

  53. #53
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    So I have to change the formula again for something you could have told me a long time ago?

    I'll have a think about it and see if I can find a quick fix, but as EVERYTHING depends on the region being filled in, it might mean starting again (again).

    Not happy that you have failed to flag this until now.

  54. #54
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    In A30:

    Please Login or Register  to view this content.
    That's your lot now.
    Attached Files Attached Files
    Last edited by AliGW; 04-30-2024 at 10:32 AM. Reason: Workbook updated.

  55. #55
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    By the way, if your regions are not in the format REG-nn, then this will fall over. I hope that's not going to be the next revelation ...

  56. #56
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    I've now got two versions.

    For REG-nn formatted regions:

    Please Login or Register  to view this content.
    For named regions:

    Please Login or Register  to view this content.
    Take your pick.
    Attached Files Attached Files
    Last edited by AliGW; 04-30-2024 at 11:49 AM.

  57. #57
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Quote Originally Posted by AliGW View Post
    I've now got two versions.

    For REG-nn formatted regions:
    This solution meets my need and thanks; my queries might be irritating but this is my first experience to post on any Forum that's why I was not aware of about rules and scanning of problem before posting it on such forum.

  58. #58
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    It's your responsibility to think your queries through before you post and present them as fully as you can. What's slightly galling is having requirements added on after the fact that significantly alter the way the solution needs to be written. I've done probably three times as much work on this thread as I should have had to do if you'd presented all facts and eventualities at the start. See it as a learning process and think it through fully next time. Don't forget that nobody here is being paid for this, either by you or anyone else, so your getting help relies on our goodwill: that goodwill can erode quite quickly if someone is in the habit of drip-feeding requirements.

    For each query, think:

    1. How exactly does this need to work?
    2. Does my sample data really reflect the reality of my data?

    If you do this before you post, you are likely to get your issues solved much more quickly.

    If you need any of the formulae explaining, just shout.

    I am glad that it works for you, finally.

  59. #59
    Registered User
    Join Date
    04-28-2024
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    Thanks for the solution and advice for future.

    Before using this forum, I always search Youtube and other forums and get solutions of my problem. The problem which I first posted before this thread was about repeated sequential numbers based on the value of other columns which you have provided instantly. When I am expanding my worksheet, the new problem arises, and I initiated this thread and where I found new formulae (Let, VStack, HStack, and LAMDA) about which i have no idea and never used before. That's why my non-stop queries emerged. Anyhow, your untired help is remarkable.

    Thanks.
    Last edited by AliGW; 05-01-2024 at 01:48 AM. Reason: Please STOP quoting unnecessarily!

  60. #60
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: Need attendace sheet for saleman visited diffrent regions with different Items

    As I said, if you want an explanation, just ask (but it won't be today, as I'm out all day).

+ 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. need formulae from diffrent sheet.
    By iqss in forum Excel General
    Replies: 8
    Last Post: 11-08-2018, 11:11 AM
  2. [SOLVED] Pasting values into different sheet into one sheet in diffrent cells
    By vegaman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2015, 06:13 PM
  3. Macro to go back to the last visited Sheet
    By gargsanjay1991 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2015, 07:57 AM
  4. [SOLVED] LAST 5 saleman per day
    By makinmomb in forum Excel Formulas & Functions
    Replies: 29
    Last Post: 03-14-2014, 10:40 AM
  5. LAST 5 saleman , file attached
    By makinmomb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2014, 05:07 AM
  6. VLookup into diffrent worksheets in a diffrent workbook
    By joffy1979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-26-2013, 11:35 AM
  7. Replies: 3
    Last Post: 12-07-2011, 04:31 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