PFA OR BELOW CODE
Sub putspace() Dim rng As Range Set rng = Application.InputBox("Please Select Range", Type:=8) For Each T In rng k = T For i = 1 To Len(T) j = Mid(T, i, 1) If j = UCase(j) Then k = WorksheetFunction.Substitute(k, j, " " & j) End If T.Offset(0, 1) = WorksheetFunction.Trim(k) Next Next End Sub From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Prafull Jadhav Sent: Tuesday, October 29, 2013 10:12 AM To: excel-macros@googlegroups.com; excelvbacli...@googlegroups.com Subject: $$Excel-Macros$$ UDF convert to Macro Dear All, Very Good Morning ..and Have a Great Day Ahead! I got below Function from our group . I have modified it . We can put Space between word for example PrafullJadhav then output is Prafull Jadhav AjayNareshRane then output will be Ajay Naresh Rane MY question is Can we create Macro by using same code ...such as for each x in Range . if yes then please send me example and macro code . if we can't then Please share the reason behind I am trying to create but i cant make the same. Function space(T As String) K = T For i = 1 To Len(T) J = Mid(T, i, 1) If J = UCase(J) Then K= WorksheetFunction.Substitute(K, J, " " & J) End If Next space = K End Function Regards, Prafull Jadhav 9920553518 -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out.
remove space via macro.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12