Hi All
How can i overcome above error when trying to store unique values...Code thanks to Bakerman2
Please Login or Register to view this content.
Hi All
How can i overcome above error when trying to store unique values...Code thanks to Bakerman2
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Hi !
Try using IsError VBA function and avoid Goto statement …
Hi Marc L
Thank you for your response...pls excuse my ignorance...Works well, however, still think I'm missing something...Your thoughts...
Please Login or Register to view this content.
Or do not use goto
Please Login or Register to view this content.
Thanks for the rep' !
PHP Code:
Sub Unique_Extract()
Dim V
With CreateObject("Scripting.Dictionary")
For Each V In Range(Sheet1.[A2], Sheet1.Cells(Rows.Count, 1).End(xlUp)).Value
If Not IsError(V) Then If V > "" Then .Item(V) = ""
Next
Sheet1.[B2].Resize(.Count).Value = Application.Transpose(.Keys)
.RemoveAll
End With
End Sub
Last edited by Marc L; 05-01-2018 at 12:12 AM. Reason: optimization …
Hi Phuocam
Of course...Good catch
Didn't not even think of using IsEmpty or <>
Thanks.
@ Marc L
That's a nice one...Works well.
If cells values are only numeric, you can use IsNumeric function instead of Not IsError …
Values are both...so all good..Thanks again guys
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks