Here's some sample code for that. Paste it after ListBox1 has been populated with values
For i = 0 To Me.ListBox1.ListCount - 1
Me.ListBox1(i) = Format(Me.ListBox1(i), "DD/MM/YYYY")
Next i
Here's some sample code for that. Paste it after ListBox1 has been populated with values
For i = 0 To Me.ListBox1.ListCount - 1
Me.ListBox1(i) = Format(Me.ListBox1(i), "DD/MM/YYYY")
Next i
Range("E:E").NumberFormat = "DD/MM/YYYY"
Each ComboBox starts from "Item 0", that's why we start with "For I = 0", then " ComboBox1.ListCount - 1" counts the number of items in that ComoboBox. So the whole thing basically is just used to Loop through each item in the ComboBox
Since the loop runs through all the items, we need to specify which item we are referring to when we format to UK date format, so we start the next bit as "ComboBox1.List(I)", then to format the item we say "Format(ComboBox1.List(I), "DD/MM/YYYY")" which is just taking the current item its looking at from the ComboBox and putting it back in the same place after formatting it as UK date format.
The last line "Next I" is the end bit of the loop that says move to the next item
THIS IS A CROSS POST https://chandoo.org/forum/thre…ional-formula-help.38301/
heres a sample. not based on your code though
loop sample attached
sample file attached
sample file attached
Have a second sheet where you copy & paste special transpose, use that for the pivot or below method
Easiest way. Pivot chart. Filter whatever you don't want to see out of the Pivot and the chart will reflect accordingly
look at my code & the line you pasted. my code is in 2 lines. yours is on the same line as "'Set.Variable" Because of this it has converted the code into a comment which VBA does not run.
"MyArr = Array("X2", "X3", "X4", "X5", "X6", "X7")" must be on a separate line
Assuming percentages start A2
=IF(A2<0.1,1,IF(AND(A2>=0.1,A2<0.2),2,IF(AND(A2>=0.2,A2<0.3),3,IF(AND(A2>=0.3,A2<0.4),4,IF(AND(A2>=0.4,A2<0.5),5,IF(AND(A2>=0.5,A2<0.6),6,IF(AND(A2>=0.6,A2<0.7),7,IF(AND(A2>=0.7,A2<0.8),8,IF(AND(A2>=0.8,A2<0.9),9,10)))))))))
Refer to below link with regards to ignoring hidden files
https://www.mrexcel.com/forum/…-ignore-hidden-files.html
As for thumbs.db, if the file is not hidden then you may need to add an argument in to check file name before creating hyperlink
There's no such command for ComboBox. You'll need to use AddItem.
'Define Variables
Dim MyArr As Variant
Dim i As Long
'Clear Combobox
Me.ComboBox3.Clear
'Set Variable
MyArr = Array("X2", "X3", "X4", "X5", "X6", "X7")
'Load items into combobox
If Environ("UserName") = "magdoulinshamseldin" Then
Me.ComboBox3.AddItem "X1", 0
Else
For i = 0 To UBound(MyArr)
Me.ComboBox3.AddItem MyArr(i), i
Next i
End If
Display More