+ Reply to Thread
Results 1 to 17 of 17

formula to list dates in a table (Listing duplicate dates only once)

  1. #1
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    formula to list dates in a table (Listing duplicate dates only once)

    Hi,

    I am attemping to write an Array formula that checks a set Table and then lists all the dates that are entered in it in a new column in the correct order and also listing duplicate dates only once.

    My first try :

    Please Login or Register  to view this content.
    English Translation:

    Please Login or Register  to view this content.
    This does mostly what i would like except it doesn't list the dates in order and it also counts the Empty cell as 0.Jan.

    1. How can i adapt this so it lists the dates in order.
    2. That it does not count the empty cells and give 0.Jan

    And lastly is there anyway i can trigger this formula to run with a button:

    Hi XOR LO,

    Attached File.

    Top table is where dates are imputed and it copies them to bottom table coloumn B

    Many thanks for any help.

    Regards

    J
    Attached Files Attached Files
    Last edited by JRidge; 10-14-2013 at 08:51 AM.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Hi again J,

    You're really going to be much better off posting an attachment with this as that's quite a large formula to have to reconstruct in order to test.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Quote Originally Posted by XOR LX View Post
    Hi again J,

    You're really going to be much better off posting an attachment with this as that's quite a large formula to have to reconstruct in order to test.

    Regards
    Attached in Original post

    regards

    J

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Hi,

    That looks like an old David Hager approach you've tried to adapt, but of course that method is not designed to produce returns in size order, and you have the issue of blanks as well. Instead, try this in B83 and copy down as required:

    =IFERROR(SMALL(IF(FREQUENCY(SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>""))))),SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>""))))))>0,SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>"")))))),ROUNDUP(ROWS($1:1)/5,0)),"")

    Regards

  5. #5
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Quote Originally Posted by XOR LX View Post
    Hi,

    That looks like an old David Hager approach you've tried to adapt, but of course that method is not designed to produce returns in size order, and you have the issue of blanks as well. Instead, try this in B83 and copy down as required:

    =IFERROR(SMALL(IF(FREQUENCY(SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>""))))),SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>""))))))>0,SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>"")))))),ROUNDUP(ROWS($1:1)/5,0)),"")

    Regards
    Hi XOR LX,

    Translated:

    =WENNFEHLER(KKLEINSTE(WENN(HÄUFIGKEIT(KKLEINSTE(WENN($C$8:$AG$48<>"";$C$8:$AG$48);ZEILE(INDIREKT("1:"&SUMMENPRODUKT(--($C$8:$AG$48<>"")))));KKLEINSTE(WENN($C$8:$AG$48<>"";$C$8:$AG$48);ZEILE(INDIRECT("1:"&SUMMENPRODUKT(--($C$8:$AG$48<>""))))))>0;KKLEINSTE(WENN($C$8:$AG$48<>"";$C$8:$AG$48);ZEILE(INDIREKT("1:"&SUMMENPRODUKT(--($C$8:$AG$48<>""))))));AUFRUNDEN(ZEILEN($1:1)/5;0));"")

    Doesn't do anything... Have i done something wrong.

    Regards

    J

  6. #6
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Quote Originally Posted by XOR LX View Post
    Hi,

    That looks like an old David Hager approach you've tried to adapt, but of course that method is not designed to produce returns in size order, and you have the issue of blanks as well. Instead, try this in B83 and copy down as required:

    =IFERROR(SMALL(IF(FREQUENCY(SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>""))))),SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>""))))))>0,SMALL(IF($C$8:$AG$48<>"",$C$8:$AG$48),ROW(INDIRECT("1:"&SUMPRODUCT(--($C$8:$AG$48<>"")))))),ROUNDUP(ROWS($1:1)/5,0)),"")

    Regards
    Hi XOR LX,

    Translated:

    =WENNFEHLER(KKLEINSTE(WENN(HÄUFIGKEIT(KKLEINSTE(WENN($C$8:$AG$48<>"";$C$8:$AG$48);ZEILE(INDIREKT("1:"&SUMMENPRODUKT(--($C$8:$AG$48<>"")))));KKLEINSTE(WENN($C$8:$AG$48<>"";$C$8:$AG$48);ZEILE(INDIRECT("1:"&SUMMENPRODUKT(--($C$8:$AG$48<>""))))))>0;KKLEINSTE(WENN($C$8:$AG$48<>"";$C$8:$AG$48);ZEILE(INDIREKT("1:"&SUMMENPRODUKT(--($C$8:$AG$48<>""))))));AUFRUNDEN(ZEILEN($1:1)/5;0));"")

    Doesn't do anything... Have i done something wrong.

    Regards

    J

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Did you array-enter it?

    Regards

  8. #8
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Yep but the cell is empty, no dates are copied acroos?

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    I hope you've not been messing about with those merged cells too much!

    See attached.

    Regards
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Quote Originally Posted by XOR LX View Post
    I hope you've not been messing about with those merged cells too much!

    See attached.

    Regards
    I love my merged cells........

    Problem sorted C and K in INDIRECT -INDIREKT.....forgot to change 1.....

    Are you ready for the next problem..

    Regards

    J

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Ah, I should've spotted it myself.

    Next problem?!!?

    Regards

  12. #12
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Using the Attachment you uploaded...

    in the top table we now have dates for the courses on the left..
    On the far right we have the coloumns:
    AH (Max people on course)
    AI (How many peopl need course)
    AJ (How many goups)

    In the table at the bottum is where the instructors are applied to each course.

    Is there a way where we can:

    Formula to look at each course, Work out how many instructors are needed for the courses on a specific day and shade the appropiate box in the bottom table so we can see straight away where instructors are needed.

    I have tried to show the expected outcome in the attached table:

    The table above with dates does not have shading (Just done it to show the expected outcome)
    The table below needs shading where an instructor is required (doesn't need to be different colours, Just done so to show example)

    Any ideas or is this wishful thinking.......

    Regards

    J
    Attached Files Attached Files

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    HiJ,

    Can you just explain a bit more about this?

    Not sure I understand how you're 'grouping' your dates: why do the four 12/Sep entries for TS01 in C8:F8 form one 'group' and the four in G8:J8 another, in the sense that you wish to have just two cells shaded in the lower table for TS01 12/Sep?

    Also, assuming this is the case, are you just wanting corresponding cells to be shaded? No information to be pulled over? Just one shaded cell for each 'group' (as you seem to define them) which meets the date and "TS" criteria?

    And should these be separate colours (one for each different 'group')? And also colours which match those in the top table?

    Wouldn't it be easier to pull across e.g. names into these cells, rather than rely on mapping colours?

    Regards

  14. #14
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Hi XOR LX,

    The names are added by the drop downs once we know what courses need to be schooled and how many.

    What i am trying to do is:

    Only 4 students can be schooled in one group so there would be 2 groups i.e 2 instructors or instructor teaches twice.

    Just one shaded cell for each group on the right day and in the right Course coloumn.

    Top table has no shading, i did it to high light the groups. Bottom table can be all the same shade, i just need a visual marker where you click on that cell, use drop down and choose instructor.

    So say course TS01 had 8 students for the 12 Sept, The formula would work out we need 2 instrctor periods for this course on this date and shade 2 cells in the relevant area in the bottom table. nothing in the upper table is affected. Then i can just click on the shaded boxes and add the instructor (so the Hours and Minutes and Overnights are added (This is working).)

    Does this make sense...

    Regards

    J

  15. #15
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Ok,

    Again, things quite complex in the Conditional Formatting, so comprehensive checking required.

    Cheers
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: formula to list dates in a table (Listing duplicate dates only once)

    Hi XOR LX,

    Well my, that is a mighty fine bit of work.

    How can i see the conditional formating.
    If the Table grows how do i adjust it.

    Mighty fine bit of work, I wish i could that....

    Thank you very much.

    Regards

    J

  17. #17
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to list dates in a table (Listing duplicate dates only once)

    You're welcome.

    Home tabConditional FormattingManage Rules

    If you amend the range, you'll need to amend the Applies to: range accordingly.

    You'll also need to edit the ranges in the formula itself - the parts in red are those which will require potential revision:

    =AND(INDEX($B$83:$B$142,5*(MATCH(ROWS($1:1),1+5*(ROW(INDIRECT("1:"&1+ROWS($C$83:$AP$142)/5))-1))-1)+1)<>"",IFERROR(1/(1/(MOD(ROWS($1:1),5))),5)<=ROUNDUP(SUMPRODUCT(--(INDEX(Date,MATCH(C$82,$A$8:$A$48,0),)=INDEX($B$83:$B$142,5*(MATCH(ROWS($1:1),1+5*(ROW(INDIRECT("1:"&1+ROWS($C$83:$AP$142)/5))-1))-1)+1))/4),0))

    Also bear in mind that this is the Conditional Formatting with reference to cell C83 - if you need to make amendments to it, I suggest that you ensure that this is the active cell in the worksheet when you go in and edit the Conditional Formatting - if you're not too sure about CF in general, there are many good websites out there.

    And it goes without saying that this formula is dependent on C83:AP142 continuing to be divided into subsections of five rows.

    And if you ever get into dissecting that formula, you'll realise what a PITA your 'beloved' merged cells are!

    All the best

+ 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. Check dates in range either same dates or different dates by formula
    By breadwinner in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 07:42 AM
  2. Counting number of unique dates per month in a list of duplicate dates
    By Rackle83 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-22-2013, 10:15 AM
  3. Replies: 6
    Last Post: 03-11-2013, 06:11 PM
  4. List of unique and duplicate names that correspond with dates
    By corbintx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2012, 01:24 PM
  5. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 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