TEXTJOIN/ CONCATENATE with numbering and formatting

Shark88

New Member
Joined
Jul 5, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I’m trying to combine a series of cells but want it in a list format, so for example if the cells are:
A1 Apple
A2 01/01/2024
A3 Banana
A4 02/01/2024
A5
A6

I want it to read:

1. Apple 01/01/2024
2. Banana 02/01/2024

I’m currently using

TEXTJOIN(“”,TRUE, “1.”,A1,TEXT(A2, “mm/dd/yyyy”),CHAR(10), “2.”,A3,TEXT(A4, mm/dd/yyyy”),CHAR(10), “3.”, A5, TEXT(A6, mm/dd/yyy”))

The problem is that each column has varying numbers of fields to combine so I want it to essentially stop adding the numbering and empty date showing up as 01/00/1900.

If I remove the text for the date formatting, regardless of how the information is stored it keeps trying to return it as a number and I have not found another way of fixing that. I can’t seem to find another way to add a number in front to create steps in a list either, but I end up having the following returned:

1. Apple 01/01/2024
2. Banana 02/01/2024
3. 01/00/1900
 
Neat indeed. I've played around a bit and it seems like the default behavior is left to right then top down. To join top down then left right I've added TRANPOSE.
I've also noticed the format mm/dd/e what does the 'e' mean?
It is sort of a universal pattern character for the 4-digit year (it works in multiple locales).
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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