Row\Col | A | B |
---|---|---|
1 | Nums | Results |
2 | 142578 | 142578 |
3 | 2142145 | 2001248 |
4 | 2001248 | 18 |
5 | 18 | 1548 |
6 | 142776 | 12488 |
7 | 124757 | 457808 |
8 | 1548 | 198 |
9 | 111 | |
10 | 12488 | |
11 | 124777 | |
12 | 20020 | |
13 | 457808 | |
14 | 198 | |
15 | 1348 | |
16 | 16588 | |
17 | 20147 | |
18 | 2013258 |
Sheet: Sheet1 |
Sub FirstSeven()
Dim cl As Range
Dim i As Long
For Each cl In Range("A1", Range("A" & Rows.Count).End(xlUp))
If Right(cl.Value, 1) = 8 Then
i = i + 1
Range("B" & i).Value = cl.Value
If i = 7 Then Exit For
End If
Next cl
End Sub
Just so you will know next time.
Your original post said:
What formulashould I use to list the first only 7 numbers in column A, whose last digit is 8.
A Vba script is not considered a Formula.