@Ricardo - perhaps worth ensuring that the Split is assigned to first non-blank (ie account for possibility that A1 is blank etc)
@patentprio - If :
a) the values are constants
b) blanks are real blanks (not Nulls, spaces etc)
c) number of rows specified is never excessive
you might find you can avoid iteration courtesy of a SpecialCells approach, ie:
(you could also consider using an AutoFilter method)Sub Example() With Sheets("Sheet1") With .Range(.Cells(1, "A"), .Cells(.Rows.Count, "A").End(xlUp)).SpecialCells(xlCellTypeConstants) .Value = Split(.Cells(1).Value, " ")(0) End With End With End Sub
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Great. It is solved!!!
Thank you so much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks