please refer on the link of my question. the answer of that link really fits. what i would like to achieve is that there will be no more unique entries/no more using of dictionary displayed in the listbox which means listbox will be displaying repeated entries still with time difference (end-start)
我在此有一个简单的用户格式,根据子公司的变化,把盒子放在一起。
com带独特清单守则:
Private Sub UserForm_Initialize()
used this code to get a dynamic combobox unique Task list in Sheet1 Column A
but I wonder why there is an extra space after the last item in combobox
Dim v, e
With Sheets("Sheet1").Range("A2:A10000")
v = .value
End With
With CreateObject("scripting.dictionary")
.CompareMode = 1
For Each e In v
If Not .Exists(e) Then .Add e, Nothing
Next
If .Count Then Me.ComboBox1.List = Application.Transpose(.Keys)
End With
End Sub
Raw Data Update (added Columns F and G in excel) ***Please don’t mind how the columns are arranged as they have a purpose.
Task ||ID ||PARAGRAPH #|| START ||END || Month || Name
Writing ||4823 || 1 ||13:00:00 ||13:15:00 || January || Larry
Reading ||4823 || 1 ||13:16:00 ||13:18:00 || February || Larry
Writing ||4823 || 2 ||13:20:00 ||13:30:00 || March || Larry
Reading ||4823 || 2 ||13:31:00 ||13:50:00 || April || Larry
Writing ||4824 || 1 ||14:00:00 ||14:10:00 || October || Cole
Reading ||4824 || 1 ||14:11:00 ||14:14:00 || October || Cole
Image of Raw (added columns F and G):
*** 本文是我最新预期结果,即用现月和栏目更改 com类(不必在单列单中设一总时段,但只列入清单框):
Private Sub ComboBox1_Change()
If ComboBox1.value = "Writing" And Month = current month Then ***
if values are present then
calculate time (end - start) for Writing rows
populate listbox of Writing entries with Total Time Column, Month Column, Name Column
no need to populate start and end cols
if there are no values found in Sheet1
ListBox1 is just blank
ElseIf ComboBox1.value = "Reading" and Month = current month Then ***
if values are present then
calculate time (end - start) for Reading rows
populate listbox of Reading entries with Total Time Column, Month Column, Name Column
no need to populate start and end cols
if there are no values found in Sheet1
ListBox1 is just blank
End If
End Sub
*** 更新清单Box 撰写本月和本月及一栏:
*** 更新清单Box预想结果,以供阅读和现月及栏目:
Note: Month format is Now, "mmmm" Name will not be required in filtering. Just needed to be brought up with the list.
http://stackoverflow.com/questions/77037452/excel-vba-form-show-unique-entries-with-time-calculation-in-list Box>question 此外,还进行了计算,但用于独一无二的身份证。 只要按照 com箱选择列出名单箱,目前的问题就不必独一无二。 答复1 涉及在子箱变换后显示的,但没有时间计算或总栏(起算)在清单箱中显示。 Edit之前的2个答复是:时间计算,但没有一个月和一栏;回答2个空白名单箱中的埃迪特回答。 提前感谢。