Transpose data from column into one single cell

LabLady11

New Member
Joined
Oct 22, 2021
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I am trying to consolidate all values in a column that contains formulas to one cell with a ',' as a delimiter. I cannot use the jointext fx because I'm not using Microsoft365. All values (that are derived from an 'IF' formula) are in column AD1:AD962 and this range will continue on indefinitely. I only want the text values in these cells to be consolidated into an adjoining empty cell (AF2) and ignore any errors that may occur in the formula.

Below is what I am trying to use; but the formula in column 'AD' is resulting in an error. I am open to a new function altogether.

Function transposeRange(Rg As Range)
'updateby Extendoffice
Dim xCell As Range
Dim xStr As String
For Each xCell In Rg
If Not IsEmpty(xCell.Value) Then
xStr = xStr & xCell.Value & ","
End If
Next
transposeRange = Left(xStr, Len(xStr) - 1)
End Function

thank you!
 
Last edited:

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top