Concatenating but having small error

Learning Slowley

New Member
Joined
Feb 22, 2017
Messages
2
I am trying to concatenate date into from 10 columns into 3.
The code that I have to concatenate columns K to Q are as follows

=IF(ISBLANK(L576),TEXT(K576,"dd/mm/yy"),TEXT(K576,"DD/MM/YY")&" - "&TEXT(L576,"DD/MM/YY"))

=IF(ISBLANK(N576),TEXT(M576,"hhmm"),TEXT(M576,"hhmm")&" - "&TEXT(N576,"hhmm"))

=IF(ISBLANK(Q576),IF(ISBLANK(P576),O576,O576&": "&P576),O576&": "&P576&" ("&Q576&")")

but I am having a display issue.....

In H, I and J, the cells are taken from K to Q.

1) There is always an event title so that simply needs to start the event preview in column J
2) There are not always further details in column P. If there are further details, I need it to start with a semi colon, if not then it should be blank.
3) I need the preview to display the location in brackets if there is a location. If not, the location should be blank.

With my formula above, if there is no start date, I am getting a 0000 in the time preview
Also, if there is no detail in column P but a location is in column Q, I am getting a semi colon and then the location in brackets.

Can anyone please assist me in putting this right?

HIJKLMNOPQ
Date previewTime previewEvent copy display previewStart DateEnd DateStartTimeEndTimeEventDetailsLocation
07/01/17 - 07/01/171130 - 1430Event title: These are the details (London)07/01/1707/01/1711:3014:30Event titleThese are the detailsLondon
08/01/170000Event title: (London)08/01/17Event titleLondon
09/01/17 - 09/01/171930Event title09/01/1709/01/17Event title

<tbody>
</tbody>
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Re: Concatenating but having small error - can anyone help?

Welcome to the forum.

For col I:

=IF(N576="",IF(M576="","",TEXT(M576,"hhmm")),TEXT(M576,"hhmm")&" - "&TEXT(N576,"hhmm"))

for col J:

=O576&IF(ISBLANK(P576),"",": "&P576)&IF(ISBLANK(Q576),""," ("&Q576&")")
 
Upvote 0
Re: Concatenating but having small error - can anyone help?

Rory, that is incredible! Thank you so much for your help.

Kind regards

Tina
 
Upvote 0
Re: Concatenating but having small error - can anyone help?

Glad to help. :biggrin:
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,392
Members
449,445
Latest member
JJFabEngineering

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