change the formula as it give all space after dot .

shrinivasmj

Board Regular
Joined
Aug 29, 2012
Messages
140
if i run this formula i need the output with out space after dot , if input is without space,
if there is space after dot in input ,then out put is with space after dot.

need to change the formula as it give all space after dot .

=UPPER(MID(TRIM(SUBSTITUTE(A1,".",". "))&","&TRIM(SUBSTITUTE(A1,".",". ")),FIND("$",SUBSTITUTE(TRIM(SUBSTITUTE(A1,".",". "))," ","$",LOOKUP(LEN(TRIM(SUBSTITUTE(A1,".",". ")))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1,{0,4,6},(LEN(TRIM(SUBSTITUTE(A1,".",". ")))-LEN(SUBSTITUTE(SUBSTITUTE(A1,".",". ")," ","")))-{0,1,2})))+1,LEN(TRIM(SUBSTITUTE(A1,".",". ")))))

*.input srinivas , out put is blank . its not taking single word.

*.input srinivas m.j.k ,out put J. K,SRINIVAS M. , if the input is without space after dot. then the out should come with out space as --J.K,SRINIVAS M.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
The obvious answer would be to change all of the instances of ". " to "." {without the space}

This makes the majority of the calculations in the formula unnecessary, however.
I offer this simplified version which I believe does what you need, but without knowing the original criteria this formula was meeting I cannot guarantee it.

=UPPER(MID(A1&","&A1,FIND("$",SUBSTITUTE(A1," ","$",LOOKUP(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1,{0,3,5},(LEN(A1)-LEN(SUBSTITUTE(A1," ","")))-{0,1,2})))+1,LEN(A1)))
 
Upvote 0
hi,input - srinivas m.j.k out put J. K,SRINIVAS M. , with the old formula .=UPPER(MID(TRIM(SUBSTITUTE(A1,".",". "))&","&TRIM(SUBSTITUTE(A1,".",". ")),FIND("$",SUBSTITUTE(TRIM(SUBSTITUTE(A1,".",". "))," ","$",LOOKUP(LEN(TRIM(SUBSTITUTE(A1,".",". ")))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1,{0,4,6},(LEN(TRIM(SUBSTITUTE(A1,".",". ")))-LEN(SUBSTITUTE(SUBSTITUTE(A1,".",". ")," ","")))-{0,1,2})))+1,LEN(TRIM(SUBSTITUTE(A1,".",". "))))) 1. Input - srinivas m. j. k. output is J. K,SRINIVAS M.OR 2. input - srinivas m.j.k ,output - J.K,SRINIVAS M.I NEED THE 1 AND 2 OUT PUT WITH ONE FORMULA , NEED TO MODIFY THE FORMULA
 
Upvote 0

Forum statistics

Threads
1,215,652
Messages
6,126,037
Members
449,281
Latest member
redwine77

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