Are you wanting a macro made to work like a function? Like: =CaseSwap(A1) where CaseSwap is: Option Explicit Public Function CaseSwap(target As String) Dim Pos As Integer Dim StrNew StrNew = "" For Pos = 1 To Len(target) If (Mid(target, Pos, 1) = UCase(Mid(target, Pos, 1))) Then StrNew = StrNew & LCase(Mid(target, Pos, 1)) Else StrNew = StrNew & UCase(Mid(target, Pos, 1)) End If Next Pos CaseSwap = StrNew End Function
Paul ----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- From: Gaurav Devrani <gauravdev1...@gmail.com> >To: excel-macros@googlegroups.com >Sent: Thursday, February 26, 2015 11:55 AM >Subject: Re: $$Excel-Macros$$ Please help me Urgent > > > >Thanks Paul for your quick reply. Yes I was also trying to create a macro but >Just wanted to confirm before, if that's possible in excel functions. No >worries. I really appreciate your quick response once again. Thank you. > > >Regards >Gaurav Devrani > > >On Thu, Feb 26, 2015 at 10:16 PM, Paul Schreiner <schreiner_p...@att.net> >wrote: > >I don't believe you'll be able to do that with standard Excel functions. >>you can create a CUSTOM function using VBA and use it like an Excel function. >>In your case, you need to process each character and "switch" the case. >>the problem is, within a standard Excel function, there's no way to "process >>each character". >> >> >> >>Paul >>----------------------------------------- >>“Do all the good you can, >>By all the means you can, >>In all the ways you can, >>In all the places you can, >>At all the times you can, >>To all the people you can, >>As long as ever you can.” - John Wesley >>----------------------------------------- >> >> >> From: Gaurav Devrani <gauravdev1...@gmail.com> >>>To: excel-macros@googlegroups.com >>>Sent: Thursday, February 26, 2015 10:12 AM >>>Subject: $$Excel-Macros$$ Please help me Urgent >>> >>> >>> >>>Hi Guys, >>> >>> >>> >>> >>>I have a query . In this sentence.. "This iS a tEst" . >>> >>> >>>All Upper case alphabets should be lower case and All Lowercase alphabets >>>should be in Upper case. Please help me . I want that to be done in excel >>>formulas.(If thats possible). >>> >>> >>> >>> >>> >>> >>>Thanks & Regards >>>Gaurav Devrani >>> >>> -- >>>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/d/optout. >>> >>> >>> >>-- >>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/d/optout. >> > > > >-- > >Thanks & Regards >Gaurav Devrani > > -- >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/d/optout. > > > -- 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/d/optout.