If you want to concatenate non blank cells in a range . Snapshot below-
Function concatenate_nonblanks(x As Range, spl As String)
Dim cell As Range
Dim rsl As String
For Each cell In x
If cell <> vbNullString Then
rsl = rsl & spl & cell
End If
Next
concatenate_nonblanks = Right(rsl, Len(rsl) - 1)
End Function
Showing posts with label UDF to concatenate non blank cells in a range. Show all posts
Showing posts with label UDF to concatenate non blank cells in a range. Show all posts
Subscribe to:
Posts (Atom)
Import data from SQL
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
-
Macro to Export Range in Json Format Option Explicit Sub export_in_json_format() Dim fs As Object Dim jsonfile Dim rangetoex...
-
If you want to run SQL queries within Excel environment without connecting to any database, you can do it with creating the ADODB conn...