excel 2013What version of Excel are you using?
Please update your account details to show this, as it affects which functions you can use.
+Fluff v2.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | 19092020 | 19092020 | 9 | ||
2 | 19092020 | 26092020 | 14 | ||
3 | 19092020 | 29092020 | 20 | ||
4 | 19092020 | ||||
5 | 19092020 | ||||
6 | 19092020 | ||||
7 | 19092020 | ||||
8 | 19092020 | ||||
9 | 19092020 | ||||
10 | 26092020 | ||||
11 | 26092020 | ||||
12 | 26092020 | ||||
13 | 26092020 | ||||
14 | 26092020 | ||||
15 | 29092020 | ||||
16 | 29092020 | ||||
17 | 29092020 | ||||
18 | 29092020 | ||||
19 | 29092020 | ||||
20 | 29092020 | ||||
21 | |||||
Summary |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C1:C3 | C1 | =LOOKUP(B1,$A$1:$A$20,ROW($A$1:$A$20)-ROW($A$1)+1) |
Not working for me. Just get #N/AThanks for that, how about
+Fluff v2.xlsm
A B C 1 19092020 19092020 9 2 19092020 26092020 14 3 19092020 29092020 20 4 19092020 5 19092020 6 19092020 7 19092020 8 19092020 9 19092020 10 26092020 11 26092020 12 26092020 13 26092020 14 26092020 15 29092020 16 29092020 17 29092020 18 29092020 19 29092020 20 29092020 21 Summary
Cell Formulas Range Formula C1:C3 C1 =LOOKUP(B1,$A$1:$A$20,ROW($A$1:$A$20)-ROW($A$1)+1)
Can I ask you to add 03102020 and 05112020 to your sample and see what result you get please. I think it may be a formatting error on my side.Not working for me. Just get #N/A
They actually numbers in column A and text in col B. ( Changed to dates later). If I change col b to numbers I get 3102020 instead of 03102020. It misses the leading zero. Sorry to be so confusing.Are those numbers actual dates formatted as 29092020, are they numbers, or are they text?
Dim d As Object, c As Variant, i As Long, LR As Long
Set d = CreateObject("Scripting.Dictionary")
LR = Cells(Rows.Count, 1).End(xlUp).Row
c = Range("a1:a" & LR)
For i = 1 To UBound(c, 1)
d(c(i, 1)) = 1
Next i
Range("b1").Resize(d.Count) = Application.Transpose(d.keys)
Dim d As Object, c As Variant, i As Long, LR As Long
Set d = CreateObject("Scripting.Dictionary")
LR = Cells(Rows.Count, 1).End(xlUp).Row
c = Range("a1:a" & LR)
For i = 1 To UBound(c, 1)
d(c(i, 1)) = i
Next i
Range("b1").Resize(d.Count, 2) = Application.Transpose(Array(d.keys, d.Items))
Perfect. Just what I needed.TryVBA Code:Dim d As Object, c As Variant, i As Long, LR As Long Set d = CreateObject("Scripting.Dictionary") LR = Cells(Rows.Count, 1).End(xlUp).Row c = Range("a1:a" & LR) For i = 1 To UBound(c, 1) d(c(i, 1)) = i Next i Range("b1").Resize(d.Count, 2) = Application.Transpose(Array(d.keys, d.Items))