noname 2 Posted February 24, 2016 Report Share Posted February 24, 2016 I have a list that looks like this June 16, 2014June 16, 2014June 16, 2014June 17, 2014June 17, 2014June 18, 2014June 18, 2014June 18, 2014June 18, 2014June 19, 2014June 19, 2014June 19, 2014June 19, 2014June 19, 2014 and I want to be able to count each one of the dateslike June 16, 2014 = 3June 17, 2014 = 2June 18, 2014 = 4June 19, 2014 = 5 I just need to count how many dates Quote Link to post Share on other sites
pash 504 Posted February 24, 2016 Report Share Posted February 24, 2016 add list to list(%List,$list from text("June 16, 2014 June 16, 2014 June 16, 2014 June 17, 2014 June 17, 2014 June 18, 2014 June 18, 2014 June 18, 2014 June 18, 2014 June 19, 2014 June 19, 2014 June 19, 2014 June 19, 2014 June 19, 2014",$new line),"Delete","Global") alert(%List) Quote Link to post Share on other sites
noname 2 Posted February 24, 2016 Author Report Share Posted February 24, 2016 Thanks for the reply but I dont want to remove the duplicates I want to count them Can somebody help Thanks Quote Link to post Share on other sites
pash 504 Posted February 24, 2016 Report Share Posted February 24, 2016 clear all data add list to list(%MyList,$list from text("June 16, 2014 June 16, 2014 June 16, 2014 June 17, 2014 June 17, 2014 June 18, 2014 June 18, 2014 June 18, 2014 June 18, 2014 June 19, 2014 June 19, 2014 June 19, 2014 June 19, 2014 June 19, 2014",$new line),"Don\'t Delete","Global") set(#TempVar,"","Global") set(#Count,0,"Global") set list position(%MyList,0) loop($list total(%MyList)) { set(#Var,$next list item(%MyList),"Global") if($both($comparison(#Var,"!=",#TempVar),$comparison($list position(%MyList),"!= Does not equal",1))) { then { add item to list(%Report,"{#TempVar} : {#Count}","Don\'t Delete","Global") set(#Count,0,"Global") } else if($comparison($list position(%MyList),">= Greater than or equal to",$list total(%MyList))) { increment(#Count) add item to list(%Report,"{#TempVar} : {#Count}","Don\'t Delete","Global") } else { } } increment(#Count) set(#TempVar,#Var,"Global") } alert(%Report) Quote Link to post Share on other sites
noname 2 Posted February 24, 2016 Author Report Share Posted February 24, 2016 thank you that worked Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.