+ Reply to Thread
Results 1 to 8 of 8

can i get code for sum of cells have alpha numeric value and other multiple factor

Hybrid View

  1. #1
    Registered User
    Join Date
    04-18-2015
    Location
    london
    MS-Off Ver
    10
    Posts
    7

    can i get code for sum of cells have alpha numeric value and other multiple factor

    i have table which contain alphanumeric value as text(serving hot pot), i want get total number serving pot
    i m attaching table for reference
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    explain how you get 29 please?

    Your explanation is a bit confusing...
    You say that "FULL CD, 1/2CD..............ARE TEXT.........2500HP,45CMPL SHOLD CONSIDER AS TEXT"
    then you say that "NUMBERS 1/2, 1/4, 3500,5000....VOLUME OF SERVING DISHES"
    so, is 1/2 to ve viewed as text or value
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-18-2015
    Location
    london
    MS-Off Ver
    10
    Posts
    7

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    Quote Originally Posted by FDibbins View Post
    explain how you get 29 please?

    Your explanation is a bit confusing...
    You say that "FULL CD, 1/2CD..............ARE TEXT.........2500HP,45CMPL SHOLD CONSIDER AS TEXT"
    then you say that "NUMBERS 1/2, 1/4, 3500,5000....VOLUME OF SERVING DISHES"
    so, is 1/2 to ve viewed as text or value
    Im sorry value shoulbe 22 instead of 29
    i m attaching table again with coloured number which should be calculated.
    pls help me to get a vbacode or array/cse formula for sum function
    Attached Files Attached Files
    Last edited by thahirkv; 04-24-2015 at 03:02 AM.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    Hi,

    Function SumAlpha(rng As Range) As Single
      Dim mtx, total As Single, v1, v2
      mtx = rng.Value
      For Each v1 In mtx
          For Each v2 In Split(v1, Space(1))
              If IsNumeric(v2) Then total = total + v2
          Next v2
      Next v1
      SumAlpha = total
    End Function
    Formula on C10 :
    Formula: copy to clipboard
    =sumalpha(C2:C9)


    Formula on D10 :
    Formula: copy to clipboard
    =sumalpha(D2:D9)



    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  5. #5
    Registered User
    Join Date
    04-18-2015
    Location
    london
    MS-Off Ver
    10
    Posts
    7

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    Quote Originally Posted by karedog View Post
    Hi,

    Function SumAlpha(rng As Range) As Single
      Dim mtx, total As Single, v1, v2
      mtx = rng.Value
      For Each v1 In mtx
          For Each v2 In Split(v1, Space(1))
              If IsNumeric(v2) Then total = total + v2
          Next v2
      Next v1
      SumAlpha = total
    End Function
    Formula on C10 :
    Formula: copy to clipboard
    =sumalpha(C2:C9)


    Formula on D10 :
    Formula: copy to clipboard
    =sumalpha(D2:D9)



    Regards
    THANKU Its worked for me

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    You are welcome, thanks for the reputation point.

    Regards

  7. #7
    Registered User
    Join Date
    04-18-2015
    Location
    london
    MS-Off Ver
    10
    Posts
    7

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    Quote Originally Posted by karedog View Post
    You are welcome, thanks for the reputation point.

    Regards
    but code cannot save
    please let me how to install the code
    Capture6.JPG
    Capture7.JPG
    Capture8.JPG
    Capture9.JPG
    could u help me to resolve this
    Last edited by thahirkv; 04-24-2015 at 05:04 AM.

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: can i get code for sum of cells have alpha numeric value and other multiple factor

    You must save the file as a macro enabled workbook.
    When you try to save the file, change the file type to this (.xlsm, not .xlsx)

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] using an alpha code for numeric value
    By alialee in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 01-17-2014, 05:36 AM
  2. [SOLVED] Sequential Alpha numeric code in batches, with spaces
    By joee74 in forum Excel General
    Replies: 5
    Last Post: 03-12-2013, 09:33 AM
  3. Convert alpha-numeric code to date
    By Buchu in forum Excel General
    Replies: 13
    Last Post: 06-04-2012, 12:51 PM
  4. Need help for a code in macro (to identify alpha numeric numbers)
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2012, 11:59 PM
  5. How do you create an alpha numeric code using data from other cells
    By jxking in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-15-2010, 11:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1