I have a range that I want to use TEXTJOIN on with delimiter CHAR(10) (linebreak) The values are the header names and the order is by the numbering that is on the row. If values are empty then ignore. see image below.
Excel TEXTJOIN Range, Order is by numbering
258 views Asked by Kobe2424 At
2
There are 2 answers
0
ΑΓΡΙΑ ΠΕΣΤΡΟΦΑ
On
Public Function makeList(items As Range, idxs As Range) As String
Dim c As Long, ccnt As Long, i As Variant
ccnt = items.Columns.CountLarge
For c = 1 To ccnt
i = idxs(1, c)
If i <> vbNullString And IsNumeric(i) Then
If i >= 1 And i <= ccnt Then
makeList = makeList & IIf(makeList = vbNullString, vbNullString, vbLf) & items(1, i)
End If
End If
Next
End Function
Related Questions in EXCEL
- Power Query / M Code, extract a list of tables into one main table, some column headers same but some different and in different order (and in row 2)
- Is there a way to validate the cell format (from excel) to fetch the symbol from it (in Java)?
- Excel - Visual Basic, macro with autofill "1"
- Getting Run-time error '13': Type Mismatch using .Find
- Getting website metadata (Excel VBA/Python)
- Excel Code Editor doesn't work (blank window)
- How to find out how many of each 2, 3 and 4 required to fit in 100 using excel?
- How would I apply a rather complex summation formula like this in Excel?
- Removing a Button from Customized Excel Ribbon
- Excel - Update Item Description Based on Accessories Ordered with It
- select duplicates from data based on another column
- How to use VBA to bold just some text
- VBA Code to filter and get values from csv to excel worksheet
- Look up max alpha numeric value
- Azure Batch for Excel VBA
Related Questions in EXCEL-FORMULA
- How would I apply a rather complex summation formula like this in Excel?
- Excel - Update Item Description Based on Accessories Ordered with It
- select duplicates from data based on another column
- Look up max alpha numeric value
- Assistance with sum for multiple separate rows using multiple criteria please
- Excel Index+ match Returns duplicate value
- requesting excel formula to compare columns but going in order and skipping blanks
- Concatenate and dropping leading zeros
- Math's & Excel formula to calculate the interest rate from the EMI and principal amount?
- Excel - How get everything to the left of the second to last instance of a character
- Calendar is not Highlighting Accurate Time
- How to search for size in the list and set costing based on it?
- Is there a way to set a cells value based on the value this cell held at a certain time, even when the cell value changes over time?
- How to sum monthly data in Excel into quarterly
- Can I use Sumproduct arrays and check two separate criteria counting TRUE statements?
Related Questions in TEXTJOIN
- How to look at multiple map ranges in google sheets
- GOOGLE SHEETS: Adding letters to the end of words, replacing specific letters with other letters (Concatenate, Regexreplace, Textjoin?)
- Check box and Vlookup
- Trying to use IF statement to return output combining string and cell information
- Color multiple words inside a textjoin formula
- Array formula text join with column header
- How to merge text based on a specific condition
- textjoin if the next Column is repeated
- Need to modify column concatenate VBA script to join selected columns only instead as well as to separate joined columns with a comma
- Googlesheets: joining multiple cells from multiple rows into one unique cell for each row
- Pull values into one cell based on multiple criteria
- Excel formula to manipulate cell text
- Excel sheets TextJoin activating when editing unrelated cells
- ArrayFormula with IF statement in Google Sheets (includes a TextJoin)
- Google Sheets ARRAYFORMULA/QUERY function to group and concat rows before date
Related Questions in EXCEL-TABLES
- VBA Selecting Multiple Noncontiguous Table Columns by Name
- Excel creating a dynamic table of columns
- Edit Named Table Data from a Userform
- Is there a way to apply a data validation to a cell from a list that is in an excel table?
- replace copied value to Table with a new calculated value and button
- Delete Specific Items from Filtered Table
- Add default values to new table row when using the Tab key?
- Aggregate Excel Table and add custom columns
- Do table names in Excel that end with digit have an undocumented minimum length limit?
- Rearrange a table in Power query
- Excel 2016- Table will add a new row when the sheet is unprotected, but won't when it is protected
- Excel Formula problem not returning reference of last row of a table
- Expand current on change to include multiple target ranges
- How do I use structured references in Excel VBA names.add?
- Doesn’t Google Spreadsheet have a function like Excel’s ‘Table’?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)


This would go in E2 and then you can drag the formula down. It filters the fruit names according to if there are rank numbers for them in that row, and removes any that don't (e.g. Orange and Peach on row 4). It then sorts by ascending number and joins the results with a line break.