Good Logic, DON Sir *If Not Mid(rng, i, 1) Like "[!0-9]" Then* On Tue, May 29, 2012 at 6:08 PM, dguillett1 <[email protected]> wrote:
> Use this simpler function in a REGULAR module for only numbers. For > only text simply remove the NOT > It will work with all strings such as > 12abc34de56fgh78ijk9 > > Function ONSAS(rng As Range) > Dim i As LONG > For i = 1 To Len(rng) > If Not Mid(rng, i, 1) Like "[!0-9]" Then > ONSAS = ONSAS & Mid(rng, i, 1) > End If > Next i > End Function > > Don Guillett > Microsoft MVP Excel > SalesAid Software > [email protected] > > *From:* NOORAIN ANSARI <[email protected]> > *Sent:* Tuesday, May 29, 2012 1:27 AM > *To:* [email protected] > *Subject:* Re: $$Excel-Macros$$ How to collect only numeric value from a > particular cell > > Dear Lakshman, > > Please see attached sheet, It is working fine.. > > Let's know where are you facing problem. > > -- > Thanks & regards, > Noorain Ansari > www.noorainansari.com > www.excelmacroworld.blogspot.com > > On Tue, May 29, 2012 at 11:44 AM, LAKSHMAN PRASAD > <[email protected]>wrote: > >> Hello champ., >> This formula is picking up only first disit of cell only. >> 1001GANG****** >> 1**** >> 1002COL.**** >> 1**** >> 1002TEJI**** >> 1**** >> 1003SUDH**** >> 1**** >> **** >> Regards >> LAKSHMAN >> >> >> *From:* Rajan_Verma <[email protected]> >> *To:* [email protected] >> *Sent:* Monday, May 28, 2012 7:12 PM >> *Subject:* RE: $$Excel-Macros$$ How to collect only numeric value from a >> particular cell >> ** >> Hi, >> >> If your data in Alphanumeric value in *A1* then use it in *B1* >> >> * >> =IFERROR(SUM(INT(MID(A1,LARGE(--ISNUMBER(INT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))*ROW(INDIRECT("1:"&LEN(A1))),ROW(INDIRECT("1:"&SUM(--ISNUMBER(INT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))))),1)*10^ROW(INDIRECT("1:"&SUM(--ISNUMBER(INT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))))))/10,"") >> * >> >> ** >> ** >> *Regards* >> *Rajan verma* >> *+91 7838100659 [IM-Gtalk]* >> >> *From:* [email protected] [mailto: >> [email protected]] *On Behalf Of *vishal angre >> *Sent:* 28 May 2012 4:52 >> *To:* [email protected] >> *Cc:* [email protected] >> *Subject:* Re: $$Excel-Macros$$ How to collect only numeric value from a >> particular cell >> >> >> Function removetext(c As String) >> Dim String1 As String >> Dim i As Integer >> String1 = "" >> For i = 1 To Len(c) >> If IsNumeric(Mid(c, i, 1)) Then >> String1 = String1 & Mid(c, i, 1) >> End If >> Next >> removetext = String1 >> >> End Function >> >> >> >> >> >> On Mon, May 28, 2012 at 4:30 PM, LAKSHMAN PRASAD <[email protected]> >> wrote: >> How to collect only numeric value from a particular cell >> >> 1462NIRM >> 1462 >> 1464NIRM >> 1464 >> 1465NIRM >> 1465 >> 1404--BL >> 1404 >> 1031Infr >> 1031 >> 8020LOKN >> 8020 >> 202D.B. >> 202 >> 922Parmi >> 922 >> 5071RIFA >> 5071 >> 1040Harj >> 1040 >> 5078Harj >> 5078 >> 1471Raj >> 1471 >> 1571Raj >> 1571 >> 414Ruchi >> 414 >> 2084AJAY >> 2084 >> >> Regards >> LAKSHMAN >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 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) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to [email protected] >> >> To unsubscribe, send a blank email to >> mailto:excel-macros%[email protected]<excel-macros%[email protected]> >> >> >> >> -- >> With Regards, >> *Vishal K. Angre* >> E-mail : [email protected] >> [email protected] >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 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) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to [email protected] >> >> To unsubscribe, send a blank email to >> [email protected] >> -- **FORUM RULES (986+ members already BANNED for violation)** **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) Cross-promotion of, or links >> to, forums competitive to this forum in signatures are prohibited. ** **NOTE >> : Don't ever post personal or confidential data in a workbook. Forum owners >> and members are not responsible for any loss.** ** >> ------------------------------------------------------------------------------------------------------ >> **To post to this group, send email to [email protected]** **To >> unsubscribe, send a blank email to >> mailto:excel-macros%[email protected]<excel-macros%[email protected]> >> **** >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 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) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to [email protected] >> >> To unsubscribe, send a blank email to >> mailto:excel-macros%[email protected]<excel-macros%[email protected]> >> > > > > > > > -- > FORUM RULES (986+ members already BANNED for violation) > > 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) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to [email protected] > > To unsubscribe, send a blank email to > [email protected] > > -- > FORUM RULES (986+ members already BANNED for violation) > > 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) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to [email protected] > > To unsubscribe, send a blank email to > [email protected] > -- Thanks & regards, Noorain Ansari www.noorainansari.com www.excelmacroworld.blogspot.com -- FORUM RULES (986+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to [email protected] To unsubscribe, send a blank email to [email protected]
