need p letter in between number and letter

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
1,010
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team

I have data in Column A and B and output coming in Column G but I need data as per column I like I10, I13 and I16 cells like where ever I have data wiht numbers and letter I need p and r should come in the center please ref yellow highlighted


book2
ABCDEFGHI
1But I need as
29.127.6p9.127.6 p27.6 p
314.333.8p14.333.8 p33.8 p
493.5493.54.04.0
551.917.751.917.717.7
66122.5p61.022.5 p22.5 p
790.92.890.92.82.8
889.62.889.62.82.8
968.810.968.810.910.9
1032.534.6 ACp32.534.6 AC p34.6 p AC
1176.61.976.61.91.9
1270.110.970.110.910.9
1380.510.6 Ap80.510.6 A p10.6 p A
1488.35.4 C88.35.4 C 5.4 C
15872.987.02.92.9
16876.7 ACp87.06.7 AC p6.7 p AB
1788.35.4 A88.35.4 A 5.4 A
1889.66.689.66.66.6
Sheet1
Cell Formulas
RangeFormula
F2:F18F2=A2
G2:G18G2=TEXT(B2,"0.0")&" "&D2
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Perhaps this:
Book1
ABCDEFGHIJK
1But I need as Formula
29.127.6p9.127.6 p27.6 p27.6 p
314.333.8p14.333.8 p33.8 p33.8 p
493.5493.54.044
551.917.751.917.717.717.7
66122.5p6122.5 p22.5 p22.5 p
790.92.890.92.82.82.8
889.62.889.62.82.82.8
968.810.968.810.910.910.9
1032.534.6 ACp32.534.6 AC p34.6 p AC 34.6 p AC
1176.61.976.61.91.91.9
1270.110.970.110.910.910.9
1380.510.6 Ap80.510.6 A p10.6 p A 10.6 p A
1488.35.4 C88.35.4 C 5.4 C 5.4 C
15872.9872.92.92.9
16876.7 ACp876.7 AC p6.7 p AB6.7 p AC
1788.35.4 A88.35.4 A 5.4 A 5.4 A
1889.66.689.66.66.66.6
Sheet1
Cell Formulas
RangeFormula
F2:F18F2=A2
G2:G18G2=TEXT(B2,"0.0")&" "&D2
K2:K18K2=TRIM(LEFT(B2,FIND(" ",B2&" "))&" "&D2&" "&IF(ISNUMBER(FIND(" ",B2)),RIGHT(B2,LEN(B2)-FIND(" ",B2)),""))
 
Upvote 1
Solution
Try this:

Book1
ABCDEFGHI
1But I need as
29.127.6p9.127.6 p27.6 p
314.333.8p14.333.8 p33.8 p
493.5493.54.04
551.917.751.917.717.7
66122.5p6122.5 p22.5 p
790.92.890.92.82.8
889.62.889.62.82.8
968.810.968.810.910.9
1032.534.6 ACp32.534.6 p AC34.6 p AC
1176.61.976.61.91.9
1270.110.970.110.910.9
1380.510.6 Ap80.510.6 p A10.6 p A
1488.35.4 C88.35.4 C5.4 C
15872.9872.92.9
16876.7 ACp876.7 p AC6.7 p AB
1788.35.4 A88.35.4 A5.4 A
1889.66.689.66.66.6
Sheet1
Cell Formulas
RangeFormula
F2:F18F2=A2
G2:G18G2=TRIM(SUBSTITUTE(TEXT(B2,"0.0 ")," "," "&D2&" ",1))
 
Upvote 0
Perhaps this:
Book1
ABCDEFGHIJK
1But I need as Formula
29.127.6p9.127.6 p27.6 p27.6 p
314.333.8p14.333.8 p33.8 p33.8 p
493.5493.54.044
551.917.751.917.717.717.7
66122.5p6122.5 p22.5 p22.5 p
790.92.890.92.82.82.8
889.62.889.62.82.82.8
968.810.968.810.910.910.9
1032.534.6 ACp32.534.6 AC p34.6 p AC 34.6 p AC
1176.61.976.61.91.91.9
1270.110.970.110.910.910.9
1380.510.6 Ap80.510.6 A p10.6 p A 10.6 p A
1488.35.4 C88.35.4 C 5.4 C 5.4 C
15872.9872.92.92.9
16876.7 ACp876.7 AC p6.7 p AB6.7 p AC
1788.35.4 A88.35.4 A 5.4 A 5.4 A
1889.66.689.66.66.66.6
Sheet1
Cell Formulas
RangeFormula
F2:F18F2=A2
G2:G18G2=TEXT(B2,"0.0")&" "&D2
K2:K18K2=TRIM(LEFT(B2,FIND(" ",B2&" "))&" "&D2&" "&IF(ISNUMBER(FIND(" ",B2)),RIGHT(B2,LEN(B2)-FIND(" ",B2)),""))

Thank you so much for your help with this...:)
 
Upvote 0
Try this:

Book1
ABCDEFGHI
1But I need as
29.127.6p9.127.6 p27.6 p
314.333.8p14.333.8 p33.8 p
493.5493.54.04
551.917.751.917.717.7
66122.5p6122.5 p22.5 p
790.92.890.92.82.8
889.62.889.62.82.8
968.810.968.810.910.9
1032.534.6 ACp32.534.6 p AC34.6 p AC
1176.61.976.61.91.9
1270.110.970.110.910.9
1380.510.6 Ap80.510.6 p A10.6 p A
1488.35.4 C88.35.4 C5.4 C
15872.9872.92.9
16876.7 ACp876.7 p AC6.7 p AB
1788.35.4 A88.35.4 A5.4 A
1889.66.689.66.66.6
Sheet1
Cell Formulas
RangeFormula
F2:F18F2=A2
G2:G18G2=TRIM(SUBSTITUTE(TEXT(B2,"0.0 ")," "," "&D2&" ",1))
Hi

I need few changes on above data all good with the data just I need "34.6 p AC " as 34.6pAC (without space if I have any letter after p
 
Upvote 0
You can use the below formula :

Excel Formula:
=MAP(B2:B25,D2:D25,LAMBDA(x,y,LET(a,TEXTSPLIT(x&" ",," "),INDEX(a,1)&""&y&""&INDEX(a,2))))
 
Upvote 0
You can use the below formula :

Excel Formula:
=MAP(B2:B25,D2:D25,LAMBDA(x,y,LET(a,TEXTSPLIT(x&" ",," "),INDEX(a,1)&""&y&""&INDEX(a,2))))
Hi Sir,

Thank you so much for checking on this

but I need to remove space only on if we have data in this format "34.6 p AC " to 34.6pAC.

And for this type of data will remain the same "5.4 A or 54. p with 1 space...

Only when "p" is coming in center along with Data and letter then only I need to remove Space (34.6pAC) and rest will be same with 1 space
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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