using space between number and text

baidya91

Board Regular
Joined
Jun 1, 2016
Messages
147
How can I rewrite the duration '[TABLE="width: 205"]
<tbody>[TR]
[TD="class: xl64, width: 205"]19years7months1days' in excel in the format '19 years 7 months 1 days' using space.

A1= [TABLE="width: 205"]
<tbody>[TR]
[TD="class: xl64, width: 205"]19years7months1days

B1= 19 years 7 months 1 days[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
UGLY, but
Code:
=MID(A1,1,2)&" "&MID(A1,3,5)&" "&MID(A1,8,1)&" "&MID(A1,9,6)&" "&MID(A1,15,1)&" "&MID(A1,16,4)
probably would be much simpler using Custom function !
 
Upvote 0
How can I rewrite the duration '[TABLE="width: 205"]
<tbody>[TR]
[TD="class: xl64, width: 205"]19years7months1days' in excel in the format '19 years 7 months 1 days' using space.

A1= [TABLE="width: 205"]
<tbody>[TR]
[TD="class: xl64, width: 205"]19years7months1days

B1= 19 years 7 months 1 days[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Give this a try...
Code:
[table="width: 500"]
[tr]
	[td]=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"years"," years "),"months"," months "),"days"," days")[/td]
[/tr]
[/table]
 
Upvote 0
OMG.....obviously too much Xmas for me !!
nice one Rick....didn't even think of that..:banghead:
A much smarter option....merry xmas and a happy NY to your Rick
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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